Skip to content

Commit fca85ee

Browse files
authored
fixed legacy PHP syntax (#9024)
1 parent 17bd1d4 commit fca85ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ If your route has dependencies that you would like the Laravel service container
197197

198198
Occasionally you may need to specify a route parameter that may not always be present in the URI. You may do so by placing a `?` mark after the parameter name. Make sure to give the route's corresponding variable a default value:
199199

200-
Route::get('/user/{name?}', function (string $name = null) {
200+
Route::get('/user/{name?}', function (?string $name = null) {
201201
return $name;
202202
});
203203

204-
Route::get('/user/{name?}', function (string $name = 'John') {
204+
Route::get('/user/{name?}', function (?string $name = 'John') {
205205
return $name;
206206
});
207207

0 commit comments

Comments
 (0)