app/Http/Controllers/CarController.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)
    {
        $newEntry = new Car;
        $newEntry->brand = $request->brand;
        $newEntry->year = $request->year;
        $newEntry->color_id = $request->color_id;
        $newEntry->save();
        return redirect()->back();
    }
public function store ( Request $ request ) { $ newEntry = new Car ; $ newEntry -> brand = $ request -> brand ; $ newEntry -> year = $ request -> year ; $ newEntry -> color_id = $ request -> color_id ; $ newEntry -> save ( ) ; return redirect ( ) -> back ( ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .