app/Http/Controllers/EventController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $event = new Event;
        $event->title = $request->input('title');
        $event->edate = $request->input('edate');
        if($event->save()) {
            return new EventResource($event);
        }
    }
public function store ( Request $ request ) { $ event = new Event ; $ event -> title = $ request -> input ( 'title' ) ; $ event -> edate = $ request -> input ( 'edate' ) ; if ( $ event -> save ( ) ) { return new EventResource ( $ event ) ; } }
Store a newly created resource in storage.
Store a newly created resource in storage .