Skip to content

Commit

Permalink
Add missing slash to routes (#9770)
Browse files Browse the repository at this point in the history
  • Loading branch information
TENIOS authored Jul 18, 2024
1 parent e9cd4fd commit 18dbb77
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ php artisan make:controller ProvisionServer --invokable

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

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

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:

Expand Down
2 changes: 1 addition & 1 deletion eloquent-serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Alternatively, you may cast a model or collection to a string, which will automa

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:

Route::get('users', function () {
Route::get('/users', function () {
return User::all();
});

Expand Down
2 changes: 1 addition & 1 deletion routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ If a group of routes all utilize the same [controller](/docs/{{version}}/control
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:

Route::domain('{account}.example.com')->group(function () {
Route::get('user/{id}', function (string $account, string $id) {
Route::get('/user/{id}', function (string $account, string $id) {
// ...
});
});
Expand Down

0 comments on commit 18dbb77

Please sign in to comment.