I want to be able to access Laravel Nova from the root, i.e. from example.com
and not example.com/nova
.
I have tried changing the path setting in config/nova.php
to '/'
. Going to example.com
then redirects to example.com/login
which looks right, but it throws the following error:
No hint path defined for [nova].
I'm new to Laravel but some searching suggests this is to do with the FileViewFinder but I don't know how to resolve this. The closest answer I found suggested adding Laravel/Nova/Http/Middleware/ServeNova
to the list of providers in config/app.php
but this throws a new error (Call to undefined method Laravel\Nova\Http\Middleware\ServeNova::isDeferred()
).
Is it possible to serve Nova from the root and if so, how?
Just change the 'path' to '/' in config/nova.php should work:
'path' => '/',
Alternatively, you can do a redirect like this in your web.php file
Route::get('/', function () {
return redirect(config('nova.path'));
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With