Support the ongoing development of Laravel.io →
Database Views Session
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Slide; use App\Product; class PageController extends Controller { public function getIndex(){ $slide= Slide::all(); $new_product = Product::where('new',1)->get(); dd($new_product); return view('page.trangchu',compact('slide','new_product')); } }
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

baby baby boicon0011 Joined 13 Jul 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.