I am using Laravel 8 and I have installed InertiaJS, but in my directory resources/views/ I have a single file called index.blade.php which I plan to use with InertiaJS.
By default, InertiaJS looks for a file inside that directory called app.blade.php. I know writing the following statement:
\Inertia\Inertia::setRootView('index');
Change the rootView and allow me to use the file I have created. It may seem like a stupid question, but as far as I see it, I can do 2 things ..
- Rename file
index.blade.phptoapp.blade.php - Write the previous sentence .. in one of the
ServiceProvidersthat I have
I wonder the following:
InertiaJS-Laraveldoes not allow publishing aServiceProviderwith the commandphp artisan vendor:publish? (the output of this command does not show me anything to publish regarding this package)- To solve my problem I should create a
ServiceProviderlike:php artisan make:provider InertiaServiceProviderand then register it? - Or just add the previous statement to one of the
ServiceProviderthat already exist? Like inapp/Http/Providers/RouteServiceProvider.php
What do you recommend that would be better?
I want to seek the largest possible organization in my project. Thank you very much in advance...