Commit 6a706ea8 by 杨树贤

修复全局变量问题

parent 1fed1b3b
Showing with 1 additions and 1 deletions
...@@ -15,6 +15,7 @@ class CheckIp ...@@ -15,6 +15,7 @@ class CheckIp
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
view()->share('is_disable_ip', 0);
//laravel get route name //laravel get route name
$routeName = \Illuminate\Support\Facades\Route::currentRouteName(); $routeName = \Illuminate\Support\Facades\Route::currentRouteName();
if ($routeName == 'info') { if ($routeName == 'info') {
...@@ -26,7 +27,6 @@ class CheckIp ...@@ -26,7 +27,6 @@ class CheckIp
view()->share('is_disable_ip', 1); view()->share('is_disable_ip', 1);
return redirect()->to('/info'); return redirect()->to('/info');
} }
view()->share('is_disable_ip', 0);
return $next($request); return $next($request);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment