<?php

namespace App\Http\Middleware;

use Closure;

use Auth;

class AdminMiddleware
{

    public function handle($request, Closure $next){
        if (
            (auth()->check()) && 
            (Auth::user()->rol_id_rol == 1 || Auth::user()->rol_id_rol == 5)
        ){
            return $next($request);
        } else {
            abort(403);
        }
    }
}
