app/Http/Controllers/EventController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $event = Event::findOrFail($id);
        $event->title = $request->input('title');
        $event->edate = $request->input('edate');
        if($event->save()) {
            return new EventResource($event);
        }
    }
public function update ( Request $ request , $ id ) { $ event = Event :: findOrFail ( $ id ) ; $ event -> title = $ request -> input ( 'title' ) ; $ event -> edate = $ request -> input ( 'edate' ) ; if ( $ event -> save ( ) ) { return new EventResource ( $ event ) ; } }
Update the specified resource in storage.
Update the specified resource in storage .
// Get event