0
==私はミドルウェア を使用してlaravel 5.5 イム上のプロジェクトを持っており、これはLaravel 5.5のミドルウェアでURLを取得する方法は?
<?php
namespace App\Http\Middleware;
use Closure;
class roleMiddleware
{
public function handle($request, Closure $next)
{
// if code to check where the url is
// code here
//else
//code here
//else
//code
//return $next($request);
}
}
はので、私は、要求が どこから来チェックするコードが必要なコードであり、それは何かを==場合は、それならば、この を行いますあなたが使用することができ、クエリ文字列で
$request->url(); // without query string
:あなたはあなたのミドルウェアの内部で使用することができます
リクエストをミドルウェアから取得するにはどうすればよいですか –