Answer the question
In order to leave comments, you need to log in
When do you need to inherit Controller?
Hello.
I periodically create classes that are neither models nor controllers - i.e. they just contain all sorts of utility functions.
But by inertia, I create them through artisan make:controller :-) and, accordingly, it inherits the Controller class
. And I suspect that this is not always necessary ))
What do I get from the Controller class in my controllers?
For example, dependency injection into a function - is it from him?
How to understand where I need it and where not?
Thank you.
Answer the question
In order to leave comments, you need to log in
I periodically create classes that are neither models nor controllers - i.e. they just contain all sorts of utility functions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question