Reputation: 1478
There's a way of know the current URL on a controller at Laravel?
Upvotes: 0
Views: 61
Reputation: 1525
Try $_SERVER['REQUEST_URI'].
If you need more than just the current URI, you can find all of the pieces on the $_SERVER array. The documentation on that array: http://www.php.net/manual/en/reserved.variables.server.php
Upvotes: 0
Reputation: 2220
You can use the following function from the Request
class.
Request::url()
Upvotes: 2