Closed LadyNay closed 4 years ago
Tried this as well: I get the page now, though the status is not being picked up and the page shows regardless: public function handle($request, Closure $next) { if(AppSetting::get('app_maintenance') == 'yes') { return redirect()->route('maintenance'); } else { return $next($request); } }
public function handle($request, Closure $next) { if(setting('app_maintenance') == true) { return Response::view('frontend.single_pages.maintenancemode'); } else { return $next($request); } }
I think my app was just stuck, but the above works if anyone needs the code.
Hi,
I am battling to get the value of the settings or checking it. I want to check if the setting is 'yes' then the maintenance page will show if not then not.
I am using it in the middleware and have called it in the boot like you showed me the last time: <?php
namespace App\Http\Middleware;
use Closure;
class MaintenanceMode { /**