Core\Url url()
Using our url() function will give you access to our core url class, which is used to handle primarily the creation of links and sending users from one page to another.
<?php // Create a URL echo url()->make('/foo'); // Converts to http://localhost/foo // Sends a user to another route url()->send('/foo'); |
Method | Description | Usage | Returns | |
---|---|---|---|---|
make(string $route [, array $params = []] )
$route URL route. $params (optional) Params can be passed, which will be converted
| Creates a new link. |
| Prepared link. | |
send(string $route [, array $params = [], string $message = null])
$route Provide the segment number $params (optional) Params can be passed, which will be converted $message (optional) Message to display to the user once they have reached | Sends the user to the link.
|
| null |