'view table not displaying
i've tried almost every code but still not working for me i'm trying to search multiple queries at the same time from different fields i finally managed to get all the values of variables on view page in an array but can't display it on page LIKE:
@foreach($businesses AS $business)
{{$business->id}} {{$business->name}} {{$business->email}}
but it is not getting the value from controller the code is
$businesses['businesses'] = DB::table("businesses")->where("city", "=", $_GET['id'])->where("email", "=", $_GET['email'])->where("name", "=", $_GET['name'])->get();
return view('searchbusinessnew',$businesses)->with('bc');
Solution 1:[1]
$businesses = array();
$businesses['businesses'] = DB::table("businesses")->where("city", "=", $request->get('id'))->where("email", "=", $request->get('email'))->where("name", "=", $request->get('name'))->get();
return view('searchbusinessnew', [
'businesses' => $businesses
]);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | VIKAS KATARIYA |
