public function store(Metric $metric)
    {
        try {
            $metricPoint = execute(new CreateMetricPointCommand(
                $metric,
                Binput::get('value'),
                Binput::get('timestamp')
            ));
        } catch (QueryException $e) {
            throw new BadRequestHttpException();
        }

        return $this->item($metricPoint);
    }
public function store(Metric $metric)
    {
        try {
            $metricPoint = execute(new CreateMetricPointCommand(
                $metric,
                Binput::get('value'),
                Binput::get('timestamp')
            ));
        } catch (QueryException $e) {
            throw new BadRequestHttpException();
        }

        return $this->item($metricPoint);
    }
public function store ( Metric $ metric ) { try { $ metricPoint = execute ( new CreateMetricPointCommand ( $ metric , Binput :: get ( 'value' ) , Binput :: get ( 'timestamp' ) ) ) ; } catch ( QueryException $ e ) { throw new BadRequestHttpException ( ) ; } return $ this -> item ( $ metricPoint ) ; }
Create a new metric point.

@param \CachetHQ\Cachet\Models\Metric $metric

@return \Illuminate\Http\JsonResponse
Create a new metric point .