You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `uri` function generates a [fluent URI instance](#uri) for the given URI:
1929
+
1930
+
```php
1931
+
$uri = uri('https://example.com')
1932
+
->withPath('/users')
1933
+
->withQuery(['page' => 1])
1934
+
```
1935
+
1936
+
If the `uri` function is given an array containing a callable controller and method pair, the function will create a `Uri` instance for the controller method's route path:
If the controller is invokable, you may simply provide the controller class name:
1945
+
1946
+
```php
1947
+
use App\Http\Controllers\UserIndexController;
1948
+
1949
+
$uri = uri(UserIndexController::class);
1950
+
```
1951
+
1952
+
If the value given to the `uri` function matches the name of a [named route](/docs/{{version}}/routing#named-routes), a `Uri` instance will be generated for that route's path:
0 commit comments