<?php


namespace App\Http\Middleware;


use Closure;

class Terminate
{


    //    中间件 terminate() 方法：
    public function handle($request, Closure $next)
    {
        $r = $request->route()->defaults;
        $key = '';
        if ($r){
            $key = $r['key'];
        }
        $params = $request->all();
        $uri = $request->path();
        dump($params);
        dump($uri);
        dump($key);

        //判断当前路由是否属于该管理员的权限
        return $next($request);
    }

}
