original_string: public function createIncidentAction()
      {
          try {
              $incident = execute(new CreateIncidentCommand(
                  Binput::get('name'),
                  Binput::get('status'),
                  Binput::get('message', null, false, false),
                  Binput::get('visible', true),
                  Binput::get('component_id'),
                  Binput::get('component_status'),
                  Binput::get('notify', false),
                  Binput::get('stickied', false),
                  Binput::get('occurred_at'),
                  null,
                  [],
                  ['seo' => Binput::get('seo', [])]
              ));
          } catch (ValidationException $e) {
              return cachet_redirect('dashboard.incidents.create')
                  ->withInput(Binput::all())
                  ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.incidents.add.failure')))
                  ->withErrors($e->getMessageBag());
          }
  
          return cachet_redirect('dashboard.incidents')
              ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.add.success')));
      }
code: public function createIncidentAction()
      {
          try {
              $incident = execute(new CreateIncidentCommand(
                  Binput::get('name'),
                  Binput::get('status'),
                  Binput::get('message', null, false, false),
                  Binput::get('visible', true),
                  Binput::get('component_id'),
                  Binput::get('component_status'),
                  Binput::get('notify', false),
                  Binput::get('stickied', false),
                  Binput::get('occurred_at'),
                  null,
                  [],
                  ['seo' => Binput::get('seo', [])]
              ));
          } catch (ValidationException $e) {
              return cachet_redirect('dashboard.incidents.create')
                  ->withInput(Binput::all())
                  ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.incidents.add.failure')))
                  ->withErrors($e->getMessageBag());
          }
  
          return cachet_redirect('dashboard.incidents')
              ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.add.success')));
      }
code_tokens: public function createIncidentAction ( ) { try { $ incident = execute ( new CreateIncidentCommand ( Binput :: get ( 'name' ) , Binput :: get ( 'status' ) , Binput :: get ( 'message' , null , false , false ) , Binput :: get ( 'visible' , true ) , Binput :: get ( 'component_id' ) , Binput :: get ( 'component_status' ) , Binput :: get ( 'notify' , false ) , Binput :: get ( 'stickied' , false ) , Binput :: get ( 'occurred_at' ) , null , [ ] , [ 'seo' => Binput :: get ( 'seo' , [ ] ) ] ) ) ; } catch ( ValidationException $ e ) { return cachet_redirect ( 'dashboard.incidents.create' ) -> withInput ( Binput :: all ( ) ) -> withTitle ( sprintf ( '%s %s' , trans ( 'dashboard.notifications.whoops' ) , trans ( 'dashboard.incidents.add.failure' ) ) ) -> withErrors ( $ e -> getMessageBag ( ) ) ; } return cachet_redirect ( 'dashboard.incidents' ) -> withSuccess ( sprintf ( '%s %s' , trans ( 'dashboard.notifications.awesome' ) , trans ( 'dashboard.incidents.add.success' ) ) ) ; }
docstring: Creates a new incident.
  
  @return \Illuminate\Http\RedirectResponse
docstring_tokens: Creates a new incident .