app/Http/Controllers/CarController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Car  $car
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $car = Car::where('id',$id)->first();
        $car->make = $request->get('val_1');
        $car->model = $request->get('val_2');
        $car->save();
        return $car;
    }
public function update ( Request $ request , $ id ) { $ car = Car :: where ( 'id' , $ id ) -> first ( ) ; $ car -> make = $ request -> get ( 'val_1' ) ; $ car -> model = $ request -> get ( 'val_2' ) ; $ car -> save ( ) ; return $ car ; }
Update the specified resource in storage.
Update the specified resource in storage .