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::create([
            'name' =>  $request->name,
            'place' =>  $request->location,
            'hall' =>  $request->hall,
            'shuttlecockfees' =>  $request->shuttlecockfees,
            'dateEvent' => Carbon::parse($request->dateEvent),
            'timeEvent' => $request->timeEvent
        ]);
        return redirect('events');
    }
public function store ( Request $ request ) { Event :: create ( [ 'name' => $ request -> name , 'place' => $ request -> location , 'hall' => $ request -> hall , 'shuttlecockfees' => $ request -> shuttlecockfees , 'dateEvent' => Carbon :: parse ( $ request -> dateEvent ) , 'timeEvent' => $ request -> timeEvent ] ) ; return redirect ( 'events' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .