Closed JackWH closed 6 years ago
From the package's perspective it is not really possible. You could write your own middleware to handle the MaintenanceMode or use a package like this https://github.com/MisterPhilip/maintenance-mode
But lets be honest, would you rather be a few seconds longer in Maintenance Mode than serve a site that is maybe 0.1s slower? I don't think it is worth the effort because the effect is minimal.
Closing it for now.
As part of my deployment process, I take the application offline with
php artisan down
before running the necessary tasks to deploy.Before I bring it back up again with
php artisan up
, I'd like to be able to runphp artisan opcache:optimize
to pre-compile the opcache before visitors start using the site again.If I try to do this, I get a 503 error returned through Artisan, as the application is in maintenance mode.
Can the
opcache:optimize
command whitelist itself anywhere in theCheckForMaintenanceMode
class? Is this kind of thing possible?