Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $cari = Product::where('slug', $slug)->first();
- use get() instead of first()
- $cari = Product::where('slug', $slug)->get();
- when you use first() function it will return only one array.
- use get()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement