public function store()
    {
        try {
            $schedule = execute(new CreateScheduleCommand(
                Binput::get('name'),
                Binput::get('message', null, false, false),
                Binput::get('status'),
                Binput::get('scheduled_at'),
                Binput::get('completed_at'),
                Binput::get('components', [])
            ));
        } catch (QueryException $e) {
            throw new BadRequestHttpException();
        }

        return $this->item($schedule);
    }
public function store()
    {
        try {
            $schedule = execute(new CreateScheduleCommand(
                Binput::get('name'),
                Binput::get('message', null, false, false),
                Binput::get('status'),
                Binput::get('scheduled_at'),
                Binput::get('completed_at'),
                Binput::get('components', [])
            ));
        } catch (QueryException $e) {
            throw new BadRequestHttpException();
        }

        return $this->item($schedule);
    }
public function store ( ) { try { $ schedule = execute ( new CreateScheduleCommand ( Binput :: get ( 'name' ) , Binput :: get ( 'message' , null , false , false ) , Binput :: get ( 'status' ) , Binput :: get ( 'scheduled_at' ) , Binput :: get ( 'completed_at' ) , Binput :: get ( 'components' , [ ] ) ) ) ; } catch ( QueryException $ e ) { throw new BadRequestHttpException ( ) ; } return $ this -> item ( $ schedule ) ; }
Create a new schedule.

@return \Illuminate\Http\JsonResponse
Create a new schedule .