original_string: public function addScheduleAction()
      {
          try {
              execute(new CreateScheduleCommand(
                  Binput::get('name'),
                  Binput::get('message', null, false, false),
                  Binput::get('status', Schedule::UPCOMING),
                  Binput::get('scheduled_at'),
                  Binput::get('completed_at'),
                  Binput::get('components', [])
              ));
          } catch (ValidationException $e) {
              return cachet_redirect('dashboard.schedule.create')
                  ->withInput(Binput::all())
                  ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.schedule.edit.failure')))
                  ->withErrors($e->getMessageBag());
          }
  
          return cachet_redirect('dashboard.schedule')
              ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.add.success')));
      }
code: public function addScheduleAction()
      {
          try {
              execute(new CreateScheduleCommand(
                  Binput::get('name'),
                  Binput::get('message', null, false, false),
                  Binput::get('status', Schedule::UPCOMING),
                  Binput::get('scheduled_at'),
                  Binput::get('completed_at'),
                  Binput::get('components', [])
              ));
          } catch (ValidationException $e) {
              return cachet_redirect('dashboard.schedule.create')
                  ->withInput(Binput::all())
                  ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.schedule.edit.failure')))
                  ->withErrors($e->getMessageBag());
          }
  
          return cachet_redirect('dashboard.schedule')
              ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.add.success')));
      }
code_tokens: public function addScheduleAction ( ) { try { execute ( new CreateScheduleCommand ( Binput :: get ( 'name' ) , Binput :: get ( 'message' , null , false , false ) , Binput :: get ( 'status' , Schedule :: UPCOMING ) , Binput :: get ( 'scheduled_at' ) , Binput :: get ( 'completed_at' ) , Binput :: get ( 'components' , [ ] ) ) ) ; } catch ( ValidationException $ e ) { return cachet_redirect ( 'dashboard.schedule.create' ) -> withInput ( Binput :: all ( ) ) -> withTitle ( sprintf ( '%s %s' , trans ( 'dashboard.notifications.whoops' ) , trans ( 'dashboard.schedule.edit.failure' ) ) ) -> withErrors ( $ e -> getMessageBag ( ) ) ; } return cachet_redirect ( 'dashboard.schedule' ) -> withSuccess ( sprintf ( '%s %s' , trans ( 'dashboard.notifications.awesome' ) , trans ( 'dashboard.schedule.add.success' ) ) ) ; }
docstring: Creates a new scheduled maintenance.
  
  @return \Illuminate\Http\RedirectResponse
docstring_tokens: Creates a new scheduled maintenance .