laravel-modules
laravel-modules copied to clipboard
Support for Inertia.js
Description
Currently, integrating Inertia.js with Laravel Modules requires manual setup, and there are multiple ways to implement it. However, it would be beneficial if Laravel Modules provided built-in support for Inertia.js by default. This would streamline the integration process and ensure consistency across modules.
Why is this needed?
- Inertia.js is widely used with Laravel for building modern SPA applications.
- Setting up Inertia within a module requires additional configuration, which could be automated or simplified.
- Default support would make module development with Inertia more seamless.
Yes, would be good to have this supported. I'll look into options.
Nice to have.
Description
Currently, integrating Inertia.js with Laravel Modules requires manual setup, and there are multiple ways to implement it. However, it would be beneficial if Laravel Modules provided built-in support for Inertia.js by default. This would streamline the integration process and ensure consistency across modules.
Why is this needed?
- Inertia.js is widely used with Laravel for building modern SPA applications.
- Setting up Inertia within a module requires additional configuration, which could be automated or simplified.
- Default support would make module development with Inertia more seamless.
Some sample code and links would be highly beneficial.
Description
Currently, integrating Inertia.js with Laravel Modules requires manual setup, and there are multiple ways to implement it. However, it would be beneficial if Laravel Modules provided built-in support for Inertia.js by default. This would streamline the integration process and ensure consistency across modules.
Why is this needed?
- Inertia.js is widely used with Laravel for building modern SPA applications.
- Setting up Inertia within a module requires additional configuration, which could be automated or simplified.
- Default support would make module development with Inertia more seamless.
I use Laravel 12 with inertiajs without problems, inclusive with multitenant, WhatsApp, telegram, payments, mercado libre api, shopify api, social login, sockets, etc.
Explain what do you need to do
What would be the steps to implement modules in an Inertia Vuejs Laravel project?
What would be the steps to implement modules in an Inertia Vuejs Laravel project?
- composer require nwidart/laravel-modules
- Create module
- Change view('page.blade') to inertia('path_to_vue_file'), in this case I use the module folder resources/assets/js/ to put react/vue files and into file app.js modify to search into "Modules" path the vue files
This is an old config I use into vue, actually use raect, it's old core I made https://github.com/yashiroiori/erp-tabler/blob/b2d6530bf00666f8ad665ed86e46069e2e26ebf1/resources/js/app.js#L93
This way to call file vue from controller, check package to view how work inertia with vue into modules https://github.com/yashiroiori/aclmanagertabler/blob/06349cd44443fe133d6e1930997abb589d656bc8/src/Http/Controllers/RoleController.php#L39
It would very very beneficiary. No doubt. I'ill look into options.
Yes I agree with that
Yes I agree with thatx2