app/Http/Controllers/SellerBankController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\SellerBank  $sellerBank
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $request->validate([
            'acc_name' => 'required',
            'acc_num' => 'required',
            'currency' => 'required'
        ]);
        $sellerBank = SellerBank::find($id);
        $sellerBank->acc_name = $request->get('acc_name');
        $sellerBank->acc_num = $request->get('acc_num');
        $sellerBank->currency = $request->get('currency');
        $sellerBank->save();
        return redirect()->route('sellerBank.index')
            ->with('success', 'Seller Bank Updated Successfully');
    }
public function update ( Request $ request , $ id ) { $ request -> validate ( [ 'acc_name' => 'required' , 'acc_num' => 'required' , 'currency' => 'required' ] ) ; $ sellerBank = SellerBank :: find ( $ id ) ; $ sellerBank -> acc_name = $ request -> get ( 'acc_name' ) ; $ sellerBank -> acc_num = $ request -> get ( 'acc_num' ) ; $ sellerBank -> currency = $ request -> get ( 'currency' ) ; $ sellerBank -> save ( ) ; return redirect ( ) -> route ( 'sellerBank.index' ) -> with ( 'success' , 'Seller Bank Updated Successfully' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .