Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controllers do not need to extend Illuminate\Routing\Controller #59

Closed
jerguslejko opened this issue Oct 15, 2017 · 2 comments
Closed

Comments

@jerguslejko
Copy link
Contributor

This check is actually incorrect as controllers do not need to extend Illuminate\Routing\Controller.

'extends' => \Illuminate\Routing\Controller::class,

@stefanzweifel
Copy link
Owner

Didn't know about that. Here's the link to the docs.

Note that the controller extends the base controller class included with Laravel. The base class provides a few convenience methods such as the middleware method, which may be used to attach middleware to controller actions:

🚨 Controllers are not required to extend a base class. However, you will not have access to convenience features such as the middleware, validate, and dispatch methods.

@jerguslejko
Copy link
Contributor Author

I think, I'd be better to load a list of routes and extract list of controllers from that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants