Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $catalog = Catalog::where('slug', $catalog)->with([
- 'products' => function ($query) use ($catalog) {
- $query->where('published', 1)->orderBy('sort')->paginate(1);
- }
- ])->firstOrfail();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement