{{-- @php $categories = App\Models\Category::with(['products' => function ($query) { $query->where('status', 1) ->orderBy('id', 'DESC') ->where('language_id', 1) ->limit(9); }]) ->get(); @endphp
A vast collection of titles for your spiritual growth and development

LIBRARY

@foreach ($categories as $key => $category)
@forelse ($category->products as $product) @empty
Products Coming Soon
@endforelse
@endforeach
--}} @php /* $categories = App\Models\Category::with(['products' => function ($query) { $query->where('status', 1)->where('language_id', 1)->orderBy('id', 'DESC'); }])->get(); */ $categories = App\Models\Category::where('status', 1)->with(['products' => function ($query) { $query->where('status', 1)->orderBy('language_id', 'ASC')->orderBy('id', 'ASC')->limit(12); }])->get(); @endphp
@foreach ($categories as $category)
{{ $category->category_name}}
@endforeach