Update project dependencies and configuration
- Added Filament and Tailwind CSS dependencies in composer.json. - Updated AGENTS.md to include new package versions. - Modified boost.json to include tailwindcss-development skill. - Updated DatabaseSeeder to create an admin user with a password. - Changed the root route to use HomeController instead of a closure. - Adjusted permissions for .gitignore in storage directory.
This commit is contained in:
23
app/Http/Controllers/HomeController.php
Normal file
23
app/Http/Controllers/HomeController.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\CarouselSlide;
|
||||
use App\Models\Category;
|
||||
use App\Models\Collection;
|
||||
use App\Models\Product;
|
||||
use App\Settings\GeneralSettings;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
public function __invoke(GeneralSettings $settings)
|
||||
{
|
||||
$slides = CarouselSlide::where('is_active', true)->orderBy('order')->get();
|
||||
$collections = Collection::where('is_active', true)->orderBy('order')->get();
|
||||
$categories = Category::orderBy('order')->get();
|
||||
$products = Product::with('category')->where('is_active', true)->get();
|
||||
|
||||
return view('home', compact('slides', 'collections', 'categories', 'products', 'settings'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user