Skip to content

Commit 18dbb77

Browse files
authored
Add missing slash to routes (#9770)
1 parent e9cd4fd commit 18dbb77

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

controllers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ php artisan make:controller ProvisionServer --invokable
106106

107107
[Middleware](/docs/{{version}}/middleware) may be assigned to the controller's routes in your route files:
108108

109-
Route::get('profile', [UserController::class, 'show'])->middleware('auth');
109+
Route::get('/profile', [UserController::class, 'show'])->middleware('auth');
110110

111111
Or, you may find it convenient to specify middleware within your controller class. To do so, your controller should implement the `HasMiddleware` interface, which dictates that the controller should have a static `middleware` method. From this method, you may return an array of middleware that should be applied to the controller's actions:
112112

eloquent-serialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Alternatively, you may cast a model or collection to a string, which will automa
6161

6262
Since models and collections are converted to JSON when cast to a string, you can return Eloquent objects directly from your application's routes or controllers. Laravel will automatically serialize your Eloquent models and collections to JSON when they are returned from routes or controllers:
6363

64-
Route::get('users', function () {
64+
Route::get('/users', function () {
6565
return User::all();
6666
});
6767

routing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ If a group of routes all utilize the same [controller](/docs/{{version}}/control
479479
Route groups may also be used to handle subdomain routing. Subdomains may be assigned route parameters just like route URIs, allowing you to capture a portion of the subdomain for usage in your route or controller. The subdomain may be specified by calling the `domain` method before defining the group:
480480

481481
Route::domain('{account}.example.com')->group(function () {
482-
Route::get('user/{id}', function (string $account, string $id) {
482+
Route::get('/user/{id}', function (string $account, string $id) {
483483
// ...
484484
});
485485
});

0 commit comments

Comments
 (0)