You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i am using laravel + nwidart modules + inertia + vue 3, and i can see that the site is using app.blade.php form mysite/resources/views/app.php eventhough i am using a module(core) to display my site.
The question is is there a way to to display from mysite/Modules/Core/Resources/views/layouts/app.blade.php? i have tried adding the modules path to mysite/app/Http/Middleware/HandleInertiaRequests then:
class HandleInertiaRequests extends Middleware
{
/**
* The root template that is loaded on the first page visit.
*
* @var string
*/
protected $rootView = '$module->getName();/Resources/views/layouts/app';
and this was the response:
InvalidArgumentException
View [$module->getName();.Resources.views.layouts.app] not found.
$module->getName();.Resources.views.layouts.app was not found.
Are you sure the view exists and is a .blade.php file?
what i am to achieve is to load a custom app.blade.php for every module that will be visited as my site is almost based in modules eg my index page is loaded from Modules/Core/ auth is from Modules/Auth etc etc etc and each module has it's on vue components, js and css files and also i can load components like:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, i am using laravel + nwidart modules + inertia + vue 3, and i can see that the site is using app.blade.php form mysite/resources/views/app.php eventhough i am using a module(core) to display my site.
The question is is there a way to to display from mysite/Modules/Core/Resources/views/layouts/app.blade.php? i have tried adding the modules path to mysite/app/Http/Middleware/HandleInertiaRequests then:
class HandleInertiaRequests extends Middleware
{
/**
* The root template that is loaded on the first page visit.
*
* @var string
*/
protected $rootView = '$module->getName();/Resources/views/layouts/app';
and this was the response:
InvalidArgumentException
View [$module->getName();.Resources.views.layouts.app] not found.
$module->getName();.Resources.views.layouts.app was not found.
Are you sure the view exists and is a .blade.php file?
what i am to achieve is to load a custom app.blade.php for every module that will be visited as my site is almost based in modules eg my index page is loaded from Modules/Core/ auth is from Modules/Auth etc etc etc and each module has it's on vue components, js and css files and also i can load components like:
Modules/Module-Name/Resources/views/Components/{$page['component']}.vue
Is there a way i can achieve this? if not that the best alternative?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions