Closed 1stevengrant closed 3 years ago
Hi! The issue is that web.php
is fully executed when running artisan commands and nova_get_setting()
tries to query the value from the database, which is not there during the build process. You should:
a) Run php artisan event:cache
during startup of the web application
b) Change how the routes are made to:
Route::get('/', function () {
return nova_get_setting('site_is_live') ? (new SplashPageController)->index() : view('index');
});
I can't quite work out what's happening here.
Locally, this works fine without any issues.
Package is installed and I can update via Nova no problem.
I have the following conditional in
web.php
However, when I attempt to deploy to Vapor environment
I run into a db access error.
If I remove that conditional in
web.php
- it deploys just fine.Can't figure out why.
Any ideas?