💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## laravel使用中间件 ### 中间件方法`handle` ### 中间件必须注入 `$request, Closure $next` ### 中间件必须返回 `return $next($request);` ### 中间件路由 `'middleware' => ['web', 'App\Http\Middleware\Admin']` ### 中间件路由 `->middleware('first', 'second');` ``` namespace App\Http\Middleware; use Illuminate\Http\Middleware\TrustHosts as Middleware; use Closure; class Admin { public function handle($request, Closure $next) { echo '后台'; // Perform action return $next($request); } } ```