Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Kodeeo\Http\Controllers\Frontend;
- use Kodeeo\Cuisine;
- use Kodeeo\Http\Controllers\Controller;
- use Illuminate\Http\Request;
- use Kodeeo\Models\Category;
- use Kodeeo\Models\Restaurant;
- use Kodeeo\Offer;
- use\Kodeeo\Models\Food;
- use Kodeeo\Package;
- use Kodeeo\Service;
- class HomeController extends Controller
- {
- public function home()
- {
- $restaurant_info=Restaurant::first();
- $cuisins = Cuisine::all();
- $foods=Food::with('offer')->get();
- //return $foods[0]->offer->description;
- //dd($foods);
- $package=Package::all();
- $categories=Category::with('food')->get();
- $service=Service::all();
- return view('frontend.home',compact('restaurant_info','cuisins','foods','package','categories','service'));
- }
- public function head(){
- $restaurant_info=Restaurant::first();
- return view('frontend.partials.header',compact('restaurant_info'));
- }
- public function foooter()
- {
- $restaurant_info=Restaurant::first();
- return view('frontend.partials.footer',compact('restaurant_info'));
- }
- public function index(){
- $restaurant_info=Restaurant::first();
- $cuisins = Cuisine::all();
- return view('restaurant.restaurant',compact('restaurant_info','cuisins'));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement