<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;

class CheckInstituicao
{
    /**
     * Handle an incoming request.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Closure $next
     * @return mixed
     */
    public function handle(Request $request, Closure $next)
    {
//            dd(session()->get('instituicao'));
//        if ($request->path() != 'selecao' && !$request->is('instituicao/*')) {
//            if (!\session()->has('instituicao')){
//                return redirect('selecao');
//            }
//        }

        return $next($request);
    }
}
