app/Http/Controllers/CarController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\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->car_name = $request->car_name;
        $car->car_price = $request->car_price;
        $car->car_stock = $request->car_stock;
        $car->save();
        return redirect()->route('car.index')->with('success','Data Successfully Updated');
    }
public function update ( Request $ request , $ id ) { $ car = Car :: where ( 'id' , $ id ) -> first ( ) ; $ car -> car_name = $ request -> car_name ; $ car -> car_price = $ request -> car_price ; $ car -> car_stock = $ request -> car_stock ; $ car -> save ( ) ; return redirect ( ) -> route ( 'car.index' ) -> with ( 'success' , 'Data Successfully Updated' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .