Add all files

This commit is contained in:
root
2025-11-30 11:57:22 +01:00
parent 2ee51cac4f
commit 044271db3d
1476 changed files with 142544 additions and 0 deletions

21
app/Livewire/Home.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
namespace App\Livewire;
use App\Models\Category;
class Home extends Component
{
public function render()
{
return view('home', [
// Categories which have NO parent and at least one child
'categories' => Category::whereNull('parent_id')->where(function ($query) {
$query->whereHas('children')->orWhereHas('products', function ($query) {
$query->where('hidden', false);
});
})->orderBy('sort')->get(),
'title' => 'Home',
]);
}
}