public function handle(CreateMetricPointCommand $command)
    {
        $metric = $command->metric;
        $createdAt = $command->created_at;

        // Do we have an existing point with the same value?
        $point = $this->findOrCreatePoint($command);

        $point->increment('counter', 1);

        event(new MetricPointWasCreatedEvent($this->auth->user(), $point));

        return $point;
    }
public function handle(CreateMetricPointCommand $command)
    {
        $metric = $command->metric;
        $createdAt = $command->created_at;

        // Do we have an existing point with the same value?
        $point = $this->findOrCreatePoint($command);

        $point->increment('counter', 1);

        event(new MetricPointWasCreatedEvent($this->auth->user(), $point));

        return $point;
    }
public function handle ( CreateMetricPointCommand $ command ) { $ metric = $ command -> metric ; $ createdAt = $ command -> created_at ; // Do we have an existing point with the same value? $ point = $ this -> findOrCreatePoint ( $ command ) ; $ point -> increment ( 'counter' , 1 ) ; event ( new MetricPointWasCreatedEvent ( $ this -> auth -> user ( ) , $ point ) ) ; return $ point ; }
Handle the add metric point command.

@param \CachetHQ\Cachet\Bus\Commands\Metric\CreateMetricPointCommand $command

@return \CachetHQ\Cachet\Models\MetricPoint
Handle the add metric point command .