public function handle(CreateComponentCommand $command)
    {
        $component = Component::create($this->filter($command));

        event(new ComponentWasCreatedEvent($this->auth->user(), $component));

        return $component;
    }
public function handle(CreateComponentCommand $command)
    {
        $component = Component::create($this->filter($command));

        event(new ComponentWasCreatedEvent($this->auth->user(), $component));

        return $component;
    }
public function handle ( CreateComponentCommand $ command ) { $ component = Component :: create ( $ this -> filter ( $ command ) ) ; event ( new ComponentWasCreatedEvent ( $ this -> auth -> user ( ) , $ component ) ) ; return $ component ; }
Handle the add component command.

@param \CachetHQ\Cachet\Bus\Commands\Component\CreateComponentCommand $command

@return \CachetHQ\Cachet\Models\Component
Handle the add component command .