Advertisement
KaueDrey

Untitled

Feb 21st, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <?php
  2. namespace App\Http\Middleware;
  3.  
  4. use Closure;
  5.  
  6. class BannedUser
  7. {
  8.     /**
  9.      * Handle an incoming request.
  10.      *
  11.      * @param  \Illuminate\Http\Request  $request
  12.      * @param  \Closure  $next
  13.      * @return mixed
  14.      */
  15.     public function handle($request, Closure $next)
  16.     {
  17.         if ( \Auth::user()->banned == 1 )
  18.         {
  19.             return "Was banned :(";
  20.         }
  21.        
  22.         return $next($request);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement