8000 URI by taylorotwell · Pull Request #53731 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

URI #53731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 9, 2024
Prev Previous commit
Next Next commit
add uri method to request
  • Loading branch information
taylorotwell committed Dec 2, 2024
commit ca285865a75a32e11049c18c88b062871b4c5dba
11 changes: 11 additions & 0 deletions src/Illuminate/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Support\Uri;
use RuntimeException;
use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException;
use Symfony\Component\HttpFoundation\InputBag;
Expand Down Expand Up @@ -88,6 +89,16 @@ public function method()
return $this->getMethod();
}

/**
* Get a URI instance for the request.
*
* @return \Illuminate\Support\Uri
*/
public function uri()
{
return Uri::of($this->fullUrl());
}

/**
* Get the root URL for the application.
*
Expand Down
0