Laravel 5 maintenance mode turn on without artisan

后端 未结 6 1409
-上瘾入骨i
-上瘾入骨i 2021-01-31 18:38

Is there any possibility to turn on and turn off Laravel 5 maintenance without php artisan up and down commands when my website is being hosted ?

What I\'ve done:

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 18:58

    Laravel 8 introduced secret in maintenance mode, in which you can bypass the maintenance mode by providing a secret, then your Artisan::call would work.

    You could add your routes to the $except var in CheckForMaintenanceMode middleware to bypass the check. Then your site/live route would work just fine.

提交回复
热议问题