Blame view

api/app/Http/Middleware/IsAdmin.php 434 Bytes
0d8c0f816   Thanasis Naskos   initial commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  <?php
  
  namespace App\Http\Middleware;
  
  use Closure;
  
  class IsAdmin
  {
      /**
       * Handle an incoming request.
       *
       * @param  \Illuminate\Http\Request  $request
       * @param  \Closure  $next
       * @return mixed
       */
      public function handle($request, Closure $next)
      {
25df08e6c   Chris Bellas   Merged changes fr...
18
19
20
  //        if (!$request->user()->is_admin) {
  //            abort(403, 'Unauthorized action.');
  //        }
0d8c0f816   Thanasis Naskos   initial commit
21
22
23
          return $next($request);
      }
  }