Skip to content

Commit b60bf69

Browse files
committed
Changing to php 8.3
1 parent e1efd91 commit b60bf69

File tree

102 files changed

+850
-849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+850
-849
lines changed

app/Http/Controllers/Public/HomeController.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,19 @@ public function index(Request $request)
4646
$query->where('name', 'like', '%'.$request->search.'%');
4747
}
4848

49-
// if ($request->filled('category') && $request->category !== 'all') {
50-
// $category = Category::find($request->category);
51-
// if ($category) {
52-
// $query->where(function ($query) use ($category) {
53-
// $query->where('category_id', $category->id)
54-
// ->orWhereHas('category', function ($query) use ($category) {
55-
// $query->where('parent_id', $category->id)
56-
// ->orWhere('id', $category->parent_id);
57-
// });
58-
// });
59-
// }
60-
// }
49+
if ($request->filled('category') && $request->category !== 'all') {
50+
$category = Category::find($request->category);
51+
if ($category) {
52+
$categoryIds = collect([$category->id])
53+
->merge($category->descendants()->pluck('id'))
54+
->merge($category->ancestors()->pluck('id'))
55+
->unique()
56+
->values()
57+
->toArray();
58+
59+
$query->whereIn('category_id', $categoryIds);
60+
}
61+
}
6162

6263
// Apply location filter if preferences exist
6364
if ($locationPreferences && isset($locationPreferences['coordinates'], $locationPreferences['radius'])) {
@@ -95,7 +96,7 @@ public function index(Request $request)
9596
'postcode' => $locationPreferences['postcode'] ?? null,
9697
],
9798
'stats' => [
98-
'categories' => null //Category::whereNull('parent_id')->orderBy('name')->with('children')->get(),
99+
'categories' => Category::tree()->get(),
99100
],
100101
]);
101102
}

public/build/assets/AddressInput-EE8MWOGv.js renamed to public/build/assets/AddressInput-Dr5tbBFV.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/Appearance-ChORbVE-.js renamed to public/build/assets/Appearance-iusyr9Nh.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/AuthLayout.vue_vue_type_script_setup_true_lang-1Lt6uDDp.js renamed to public/build/assets/AuthLayout.vue_vue_type_script_setup_true_lang-CFqOqPLn.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/CardContent.vue_vue_type_script_setup_true_lang-BX_EYPiC.js renamed to public/build/assets/CardContent.vue_vue_type_script_setup_true_lang-tJlZofn3.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/CardDescription.vue_vue_type_script_setup_true_lang-CTy_VayL.js renamed to public/build/assets/CardDescription.vue_vue_type_script_setup_true_lang-D3ESLOaw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/CardTitle.vue_vue_type_script_setup_true_lang-BcH_sRPf.js renamed to public/build/assets/CardTitle.vue_vue_type_script_setup_true_lang-DZSgSoOC.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)