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->update([
            'name' => $request->name,
            'place' => $request->place, 
            'hall' => $request->hall,
            'shuttlecockfees' => $request->shuttlecockfees,
            'dateEvent' => Carbon::parse($request->dateEvent),
            'timeEvent' => Carbon::parse($request->timeEvent)
        ]);
        return redirect('events');
    }
public function update ( Request $ request , $ id ) { $ event = Event :: findOrFail ( $ id ) ; $ event -> update ( [ 'name' => $ request -> name , 'place' => $ request -> place , 'hall' => $ request -> hall , 'shuttlecockfees' => $ request -> shuttlecockfees , 'dateEvent' => Carbon :: parse ( $ request -> dateEvent ) , 'timeEvent' => Carbon :: parse ( $ request -> timeEvent ) ] ) ; return redirect ( 'events' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .