app/Http/Controllers/BranchesController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Branches  $branches
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $branches = Branches::find($id);
        $branches->name = $request->input('name');
        $branches->address = $request->input('address');
        $branches->phone_number = $request->input('phone_number');
        $branches->save();
        return redirect()->route('branches.index');
    }
public function update ( Request $ request , $ id ) { $ branches = Branches :: find ( $ id ) ; $ branches -> name = $ request -> input ( 'name' ) ; $ branches -> address = $ request -> input ( 'address' ) ; $ branches -> phone_number = $ request -> input ( 'phone_number' ) ; $ branches -> save ( ) ; return redirect ( ) -> route ( 'branches.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .