fix: deep link
This commit is contained in:
@@ -9,7 +9,7 @@ class SubCategoryController extends Controller
|
||||
{
|
||||
public function index(Request $request, $categoryId = null)
|
||||
{
|
||||
$query = SubCategory::with('category')->withCount('media');
|
||||
$query = SubCategory::with('category')->withCount(['media' => fn ($q) => $q->where('is_deeplink_only', false)]);
|
||||
|
||||
$categoryId = $categoryId ?? $request->input('category_id');
|
||||
|
||||
@@ -51,7 +51,7 @@ public function store(Request $request)
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$subCategory = SubCategory::with('category')->withCount('media')->findOrFail($id);
|
||||
$subCategory = SubCategory::with('category')->withCount(['media' => fn ($q) => $q->where('is_deeplink_only', false)])->findOrFail($id);
|
||||
|
||||
return response()->json($subCategory);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user