Maintenance Mode without using Artisan?

后端 未结 5 571
日久生厌
日久生厌 2020-12-02 10:25

I\'m just wondering if anyone know\'s if there\'s a way to activate maintenance mode on a laravel website without using Artisan? I don\'t have command line access to the ser

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 10:42

    Laravel 4

    Just wanted to put this out there for everyone on the web, all php artisan down does is touch (create) an empty file in the app/storage/meta directory called 'down'. If this file exists, then the application is in maintenance mode. That's all there is to it:

    // From vendor\laravel\framework\src\Illuminate\Foundation\Application.php
    
    public function isDownForMaintenance()
    {
        return file_exists($this['config']['app.manifest'].'/down');
    }
    

    So if you can upload files, all you need to do is upload an empty file named 'down' to app/storage/meta.


    Laravel 5:

    Down is located in storage/framework/down

    Thanks ruuter.

提交回复
热议问题