The request's path information
$uri = $request->path();
// https://example.com/foo/bar --> foo/bar
#Match path to pattern
Verify that the incoming request path matches a given pattern
// \* is wildcard
if ($request->is('admin/\*')) {
//
}
Determine if the incoming request matches a named route
if ($request->routeIs('admin.\*')) {
//
}
Comments