public function store(Request $request)
    {
        $event = $this->event->create($request);

        if ($event) {
            $message = 'Successfully created event.';

            return redirect()->route('maintenance.events.index')->withSuccess($message);
        } else {
            $message = 'There was an issue creating an event. Please try again.';

            return redirect()->route('maintenance.events.create')->withErrors($message);
        }
    }
public function store(Request $request)
    {
        $event = $this->event->create($request);

        if ($event) {
            $message = 'Successfully created event.';

            return redirect()->route('maintenance.events.index')->withSuccess($message);
        } else {
            $message = 'There was an issue creating an event. Please try again.';

            return redirect()->route('maintenance.events.create')->withErrors($message);
        }
    }
public function store ( Request $ request ) { $ event = $ this -> event -> create ( $ request ) ; if ( $ event ) { $ message = 'Successfully created event.' ; return redirect ( ) -> route ( 'maintenance.events.index' ) -> withSuccess ( $ message ) ; } else { $ message = 'There was an issue creating an event. Please try again.' ; return redirect ( ) -> route ( 'maintenance.events.create' ) -> withErrors ( $ message ) ; } }
Creates a new event.

@param Request $request

@return \Illuminate\Support\Facades\Response
Creates a new event .