fix(view): register filament.pages namespace for Resource views
Pages in app/Filament/Resources/*/Pages/ with view='filament.pages.xxx' keep their blade files in app/Filament/Resources/views/, not in the default resources/views/filament/pages/. Add the path to the view finder so Laravel can locate them without requiring each Resource's view to be copied to resources/views/.
This commit is contained in:
parent
c43b6b0bec
commit
f11dfa87dc
@ -27,6 +27,13 @@ class AppServiceProvider extends ServiceProvider
|
||||
// هک برای رفع مشکل دیسک اکسل در لاراول ۱۱/۱۲
|
||||
config(['excel.temporary_files.disk' => 'local']);
|
||||
|
||||
// ─── ثبت مسیر view برای صفحات Filament Resource ───
|
||||
// صفحاتی که در app/Filament/Resources/*/Pages هستند و view='filament.pages.xxx'
|
||||
// دارند، blade خودشان را در app/Filament/Resources/views/ نگه میدارند.
|
||||
// این خط به Laravel میگوید علاوه بر resources/views/filament/pages/،
|
||||
// این مسیر را هم برای namespace 'filament.pages' جستجو کند.
|
||||
view()->addNamespace('filament.pages', app_path('Filament/Resources/views'));
|
||||
|
||||
// ثبت Observer برای اطلاعیههای تغییر سفارش
|
||||
Shipment::observe(ShipmentObserver::class);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user