public function update(Schedule $schedule)
    {
        try {
            $schedule = execute(new UpdateScheduleCommand(
                $schedule,
                Binput::get('name'),
                Binput::get('message'),
                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 update(Schedule $schedule)
    {
        try {
            $schedule = execute(new UpdateScheduleCommand(
                $schedule,
                Binput::get('name'),
                Binput::get('message'),
                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 update ( Schedule $ schedule ) { try { $ schedule = execute ( new UpdateScheduleCommand ( $ schedule , Binput :: get ( 'name' ) , Binput :: get ( 'message' ) , Binput :: get ( 'status' ) , Binput :: get ( 'scheduled_at' ) , Binput :: get ( 'completed_at' ) , Binput :: get ( 'components' , [ ] ) ) ) ; } catch ( QueryException $ e ) { throw new BadRequestHttpException ( ) ; } return $ this -> item ( $ schedule ) ; }
Update a schedule.

@param \CachetHQ\Cachet\Models\Schedule $schedule

@return \Illuminate\Http\JsonResponse
Update a schedule .