I'm Trying to display restaurant Menus grouped by the categories, for example...
- Lunch
- Chicken and Chips
- Rice
- Breakfast
- Tea
- Coffee
So I have 3 tables in my database, Restaurants, Categories, And Menus
In my Restaurant Controller i have the following
$menus=Menu::with(['category_type'])->where('restaurant_id',$restaurant->id)->get()->groupBy('category_id');
return view('frontend.restaurant.show', compact('menus'));
In My Views I need to loop through the $menus I'm stack Help ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire