<?php

namespace App\Http\Middleware\Reciption;

use Closure;

class ReciptionMiddleware
{

    public function handle($request, Closure $next)
    {
        if(auth()->user()->getRole() === 'rec')
            return $next($request);
        else {
            return  redirect()->route('home');
        }

    }
}
