under maintenance |
Which is the best and simple way to set site under maintenance ? (redirecting to a view)
Creating a filter in my opinion, or https://github.com/arashsaffari/maintenancemode
I found this solution , in view i create a specific view ( under_maintenance.php) directly under view .
In home or other controller create a function: Code: public function under_maintenance() in route Code: <?php there could be problems using this way?
HTTP status code.
The HTTP status code of the maintenance page would be 200.
It may be cached by search engines.
Problem: i have multiple routes files
I have created app with multiple modules, therefore each module has it's own routes file I use filter for maintenance, but novadays we must echo the response in filter's before() method PHP Code: // Filter
use existing package, very convenience:
arashsaffari/maintenancemode just modify the maintenancemode controller to choose which to set in maintenance mode. Code: public static function check() { .. }
(10-06-2022, 11:38 PM)ikesela Wrote: use existing package, very convenience: Hi, i did look at that repo, but it is really old and did not suit my needs. So i created my own approach using filter though |
Welcome Guest, Not a member yet? Register Sign In |