app/Http/Controllers/EventsController.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->name = $request->name;
        $event->from_date = $request->from_date;
		$event->to_date = $request->to_date;
		$event->selected_days = json_encode($request->selected_days);
		$event->colour = $request->colour;
        $event->save();
        return redirect()->route('events.index');  
    }
public function store ( Request $ request ) { $ event = new Event ; $ event -> name = $ request -> name ; $ event -> from_date = $ request -> from_date ; $ event -> to_date = $ request -> to_date ; $ event -> selected_days = json_encode ( $ request -> selected_days ) ; $ event -> colour = $ request -> colour ; $ event -> save ( ) ; return redirect ( ) -> route ( 'events.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .