Advertisement
apl-mhd

Controller

Mar 25th, 2019
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.29 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Kodeeo\Http\Controllers\Frontend;
  4. use Kodeeo\Cuisine;
  5. use Kodeeo\Http\Controllers\Controller;
  6. use Illuminate\Http\Request;
  7. use Kodeeo\Models\Category;
  8. use Kodeeo\Models\Restaurant;
  9. use Kodeeo\Offer;
  10. use\Kodeeo\Models\Food;
  11. use Kodeeo\Package;
  12. use Kodeeo\Service;
  13.  
  14.  
  15. class HomeController extends Controller
  16. {
  17.     public function home()
  18.     {
  19.         $restaurant_info=Restaurant::first();
  20.         $cuisins = Cuisine::all();
  21.  
  22.         $foods=Food::with('offer')->get();
  23.         //return $foods[0]->offer->description;
  24.  
  25.         //dd($foods);
  26.         $package=Package::all();
  27.         $categories=Category::with('food')->get();
  28.  
  29.  
  30.         $service=Service::all();
  31.         return view('frontend.home',compact('restaurant_info','cuisins','foods','package','categories','service'));
  32.     }
  33. public function head(){
  34.     $restaurant_info=Restaurant::first();
  35.     return view('frontend.partials.header',compact('restaurant_info'));
  36. }
  37. public function foooter()
  38. {
  39.  
  40.  $restaurant_info=Restaurant::first();
  41. return view('frontend.partials.footer',compact('restaurant_info'));
  42.  
  43. }
  44.     public  function index(){
  45.         $restaurant_info=Restaurant::first();
  46.         $cuisins = Cuisine::all();
  47.         return view('restaurant.restaurant',compact('restaurant_info','cuisins'));
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement