Refactor and localize settings and resources

- Updated GeneralSettings page to include localized labels and structured sections for better organization.
- Enhanced CarouselSlide, Category, Collection, and Product resources with localized model labels and improved form/table configurations.
- Modified HomeController to utilize query builder for better performance and added collection items retrieval.
- Updated views to reflect localized settings and improved layout for collections and footer.
- Adjusted timezone and locale settings in app configuration for better regional support.
This commit is contained in:
Mekan1206
2026-06-04 22:15:18 +05:00
parent b13d61b342
commit 6ea6701963
119 changed files with 5304 additions and 98 deletions

View File

@@ -13,10 +13,12 @@ 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();
$slides = CarouselSlide::query()->where('is_active', true)->orderBy('order')->get();
$collections = Collection::with(['collectionItems' => function ($query) {
$query->where('is_active', true)->orderBy('order');
}])->where('is_active', true)->orderBy('order')->get();
$categories = Category::query()->orderBy('order')->get();
$products = Product::query()->with('category')->where('is_active', true)->get();
return view('home', compact('slides', 'collections', 'categories', 'products', 'settings'));
}