<?php

namespace App\Http\Middleware;

use Closure;

use Auth;

class AnalistaMiddleware
{

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