app/Http/Controllers/Backend/CityController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $city =City::find($id);
        $city->name = $request->name;
        $city->slug = $request->slug;
        $city->status = $request->status;
        $city->save();
        $request->session()->flash('success','Cập nhật thành phố thành công');
        return redirect(route('city.index'));
    }
public function update ( Request $ request , $ id ) { $ city = City :: find ( $ id ) ; $ city -> name = $ request -> name ; $ city -> slug = $ request -> slug ; $ city -> status = $ request -> status ; $ city -> save ( ) ; $ request -> session ( ) -> flash ( 'success' , 'Cập nhật thành phố thành công'); return redirect ( route ( 'city.index' ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .