public function editScheduleAction(Schedule $schedule)
    {
        try {
            $schedule = execute(new UpdateScheduleCommand(
                $schedule,
                Binput::get('name', null),
                Binput::get('message', null),
                Binput::get('status', null),
                Binput::get('scheduled_at', null),
                Binput::get('completed_at', null),
                Binput::get('components', [])
            ));
        } catch (ValidationException $e) {
            return cachet_redirect('dashboard.schedule.edit', [$schedule->id])
                ->withInput(Binput::all())
                ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.schedule.edit.failure')))
                ->withErrors($e->getMessageBag());
        }

        return cachet_redirect('dashboard.schedule.edit', [$schedule->id])
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.edit.success')));
    }
public function editScheduleAction(Schedule $schedule)
    {
        try {
            $schedule = execute(new UpdateScheduleCommand(
                $schedule,
                Binput::get('name', null),
                Binput::get('message', null),
                Binput::get('status', null),
                Binput::get('scheduled_at', null),
                Binput::get('completed_at', null),
                Binput::get('components', [])
            ));
        } catch (ValidationException $e) {
            return cachet_redirect('dashboard.schedule.edit', [$schedule->id])
                ->withInput(Binput::all())
                ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.schedule.edit.failure')))
                ->withErrors($e->getMessageBag());
        }

        return cachet_redirect('dashboard.schedule.edit', [$schedule->id])
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.edit.success')));
    }
public function editScheduleAction ( Schedule $ schedule ) { try { $ schedule = execute ( new UpdateScheduleCommand ( $ schedule , Binput :: get ( 'name' , null ) , Binput :: get ( 'message' , null ) , Binput :: get ( 'status' , null ) , Binput :: get ( 'scheduled_at' , null ) , Binput :: get ( 'completed_at' , null ) , Binput :: get ( 'components' , [ ] ) ) ) ; } catch ( ValidationException $ e ) { return cachet_redirect ( 'dashboard.schedule.edit' , [ $ schedule -> id ] ) -> withInput ( Binput :: all ( ) ) -> withTitle ( sprintf ( '%s %s' , trans ( 'dashboard.notifications.whoops' ) , trans ( 'dashboard.schedule.edit.failure' ) ) ) -> withErrors ( $ e -> getMessageBag ( ) ) ; } return cachet_redirect ( 'dashboard.schedule.edit' , [ $ schedule -> id ] ) -> withSuccess ( sprintf ( '%s %s' , trans ( 'dashboard.notifications.awesome' ) , trans ( 'dashboard.schedule.edit.success' ) ) ) ; }
Updates the given incident.

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

@return \Illuminate\Http\RedirectResponse
Updates the given incident .