Skip to content

Commit

Permalink
Add warning regarding using HasMiddleware interface and extends `Il…
Browse files Browse the repository at this point in the history
…luminate\Routing\Controller` (#10123)

* Add warning regarding using `HasMiddleware` interface and extends
`Illuminate\Routing\Controller`.

fixes laravel/framework#54181

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Update controllers.md

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
crynobone and taylorotwell authored Jan 16, 2025
1 parent 1e02dbe commit 9cf60b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ You may also define controller middleware as closures, which provides a convenie
];
}

> [!WARNING]
> Controllers implementing `Illuminate\Routing\Controllers\HasMiddleware` should not extend `Illuminate\Routing\Controller`.
<a name="resource-controllers"></a>
## Resource Controllers

Expand Down

0 comments on commit 9cf60b0

Please sign in to comment.