/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $projects = ProjectGalleries::with('projectimages')->get(); $popular_products = Product::where('popular', 'Yes')->get(); return view('index', compact('projects', 'popular_products')); }