Laravel 9 Tutorial #19 | Create Laravel 9 MultiVendor Ecommerce Website | Update Vendor Detail (IV)

Laravel 9 Tutorial #19 | Create Laravel 9 MultiVendor Ecommerce Website | Update Vendor Detail (IV)

Stack Developers

2 года назад

3,461 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@user-ch9mf7sg9g
@user-ch9mf7sg9g - 25.12.2022 21:31

Hello!
I am unable to update the image. It turns out to update the image. Uploads to a folder, but does not update to the tables("vendor" and "business details".
Thanks for the lessons!
You are gorgeous!
if($request->hasFile('address_proof')){
$image_tmp = $request->file('address_proof');
if($image_tmp->isValid()){
//Get Image Extension
$extension = $image_tmp->getClientOriginalExtension();
//Generate New Image Name
$imageName = rand(1, 999999,).'.'.$extension;
$imagePath = 'admin/images/proofs/'.$imageName;
//Upload the Image
Image::make($image_tmp)->save($imagePath);
}
}else if(!empty($data['current_address_proof'])){
$imageName = $data['current_address_proof'];
}else{
$imageName = "";
}
//Update is vendors_business_details table
VendorsBusinessDetail::where('vendors_id',Auth::guard('admin')->user()->vendors_id)->update(['shop_name'=>$data['shop_name'], 'shop_mobile'=>$data['shop_mobile'], 'shop_address'=>$data['shop_address'], 'shop_city'=>$data['shop_city'], 'shop_state'=>$data['shop_state'], 'shop_country'=>$data['shop_country'], 'shop_pincode'=>$data['shop_pincode'], 'business_license_number'=>$data['business_license_number'], 'gst_number'=>$data['gst_number'], 'pan_number'=>$data['pan_number'], 'address_proof'=>$data['address_proof'], 'address_proof_image'=>$imageName]);
return redirect()->back()->with('success_message', 'Vendor details updated successfully!');

Ответить
@alinatariq7993
@alinatariq7993 - 20.12.2022 19:28

Sir... I faced an error of "Call to a member function toArray() on null" when I put the $vendorDetails = VendorsBusinessDetails::where('vendor_id, Auth::guard('admin')->user()->vendor_id)->first()->toArray();
In ($slug=='business')
What should I do?.. I'm trying to debug this code and repeat this code several times ...

Ответить
@insider-analyst
@insider-analyst - 17.12.2022 20:30

Why remove image required validation??

Ответить
@saidsaid-ru4sg
@saidsaid-ru4sg - 23.10.2022 17:43

Hi sir I'm enjoyed from your explaining but i have a problem it give me this error syntax error, unexpected token "elseif", expecting end of file s ples help me and thanks in advance

Ответить
@MuhammadImran-tb4xy
@MuhammadImran-tb4xy - 22.04.2022 16:06

Sir Amit in my country Pakistan id Card has two sides and I want multiple images to upload if the vendor choose an id card the option will come to upload front side image and backside image

Ответить
@MuhammadImran-tb4xy
@MuhammadImran-tb4xy - 22.04.2022 10:21

Hi sir amit.
I want to upload multiple images for CNIC front and back how can I do that

Ответить
@stefanpfadt4353
@stefanpfadt4353 - 29.03.2022 11:10

How can website owner and seller automatically be paid (split commission payment)? Any idea, plugin suggestion?

Ответить
@pushpenbanerjee9625
@pushpenbanerjee9625 - 27.03.2022 23:39

We enjoyed it. Thank You Sir.

Ответить