Комментарии:
hi, why do you use toArray() instead of use $admindetails->anything in the blade ?
Ответитьsir..!! As I logout then login with vendor admin email and password. It's show invalid email address and password.. I given the same password as u.. kindly tell me. Where I'm wrong
Ответитьwith VENDOR do you mean Supplier?????
ОтветитьThanks so much for this great tutorial. With the help of these series I am able to understand the Laravel concept. One quick question: at the final stage for updating db, we are doing two seperate queries (one for vendor, one for admin table) in order to insert the data. Wouldn't it be possible to merge the db tables and update in one query? Thanks.
Ответить//Error name
Call to a member function toArray() on null
//Controller
public function UpdateVendorDetails($slug, Request $request){
if($slug == "personal"){
if($request->isMethod('post')){
$data = $request->all();
echo "<pre>"; print_r($data); die;
}
$vendorDetails = Vendor::where('id', Auth::guard('admin')->user()->vendor_id)->first()->toArray();
}else if($slug == "business"){
}else if($slug == "bank"){
}
return view('backend.settings.update_vendor_details', compact('slug', 'vendorDetails'));
}
// Blade file
<input type="text" name="vendor_address" value="{{ $vendorDetails['address'] }}" class="form-control" id="vendor_address" >
compact(): Undefined variable: vendordetails
ОтветитьAbsolutely amazing tutorial and you have my heartfelt gratitude as your explanations are on point and amazing. I have an issue which I solved by adding this to the updateVendorDetails method in AdminController
return view('admin.settings.update_vendor_details', compact(['slug', 'vendorDetails']));
I wasn't able to use $vendorDetails in view when defined in the if statement so this was the only way I could use it. I had everything in controller, routes and view same as you yet I would keep Undefined variable $vendorDetails error. Do you have any idea why would that happen ?
admin update password page
Ответитьhello,
Sir, when will you upload all the videos of this project completion ?
Thanks a lot sir, for giving the video.
ОтветитьHello.
Do you still need to go to the administration?