Closed hafijul233 closed 1 month ago
Inertia intentionally did choose to be configured via middleware, instead of config. There are considerations (for other reasons) to go with a ServiceProvider instead.
However, you already can use Inertia::setRootView('custom.layout');
wherever you want. Like, globally in AppServiceProvider or for instance in a specific controller.
Personally, not sure if we really need yet another way to configure this.
ResponseFactory.php
class defines the $rootView point toapp.blade.php
. I thought it would be easy to configure it. Anyone who publishes the config file can easily change it.ServiceProvider
boot method workaround also has the same output. IMHO This way, it feels more neat.