Example #1
0
 public function index(Section $section, Product $shop)
 {
     $sections = $section->getSection();
     $sec = '';
     $products = $section->leftJoin('products', 'sections.id', '=', 'products.section_id')->get();
     //dd($products[1]);
     return view('pages.shop.index', ['sections' => $sections, 'products' => $products]);
 }