get env app url laravel
env('APP_URL')
maintenance mode laravel
php artisan down
laravel APP_ENV config
if (\Illuminate\Support\Facades\App::environment('production')) {
// The environment is production
}
laravel maintenance mode custom class
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Http\Request;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as MaintenanceMode;
class CheckForMaintenanceMode {
protected $app;
public function __construct(Application $app)
{
$this->app = $app;
}
public function handle(Request $request, Closure $next)
{
if ($this->app->isDownForMaintenance() &&
!in_array($request->getClientIp(), ['8.8.8.8', '8.8.4.4']))
{
$maintenanceMode = new MaintenanceMode($this->app);
return $maintenanceMode->handle($request, $next);
}
return $next($request);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us