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