Hello I am trying to pass table join from HomeController to View My controller:
public function index()
{$YourData = DB::table('users')
->join('packages', 'users.id', '=', 'packages.user_id')
->select('users.*', 'packages.name')
->get();
return view('home', compact('YourData'));}
My view:
foreach ($YourData as $dt) {
//error here
}
I have seen laravel documentation and there inst very clear in how to do this!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire