app/Http/Controllers/M_branchController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\M_branch  $m_branch
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, M_branch $m_branch)
    {
        request()->validate([
            'name' => 'required',
        ]);
        $m_branch->update($request->all());
        return redirect()->route('m_branch.index')
                        ->with('success','Branch updated successfully');
    }
public function update ( Request $ request , M_branch $ m_branch ) { request ( ) -> validate ( [ 'name' => 'required' , ] ) ; $ m_branch -> update ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'm_branch.index' ) -> with ( 'success' , 'Branch updated successfully' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .