public function handle(CreateScheduleCommand $command)
    {
        try {
            $schedule = Schedule::create($this->filter($command));

            event(new ScheduleWasCreatedEvent($this->auth->user(), $schedule));
        } catch (InvalidArgumentException $e) {
            throw new ValidationException(new MessageBag([$e->getMessage()]));
        }

        return $schedule;
    }
public function handle(CreateScheduleCommand $command)
    {
        try {
            $schedule = Schedule::create($this->filter($command));

            event(new ScheduleWasCreatedEvent($this->auth->user(), $schedule));
        } catch (InvalidArgumentException $e) {
            throw new ValidationException(new MessageBag([$e->getMessage()]));
        }

        return $schedule;
    }
public function handle ( CreateScheduleCommand $ command ) { try { $ schedule = Schedule :: create ( $ this -> filter ( $ command ) ) ; event ( new ScheduleWasCreatedEvent ( $ this -> auth -> user ( ) , $ schedule ) ) ; } catch ( InvalidArgumentException $ e ) { throw new ValidationException ( new MessageBag ( [ $ e -> getMessage ( ) ] ) ) ; } return $ schedule ; }
Handle the create schedule command.

@param \CachetHQ\Cachet\Bus\Commands\Schedule\CreateScheduleCommand $command

@return \CachetHQ\Cachet\Models\Schedule
Handle the create schedule command .