🔥 Laravel Tip: Dependency injection without any configuration
Apr 15, 2022
You can type-hint a class and Laravel will automatically inject an instance of that class.
Without any configuration.
This only works if the class has no dependencies, or it only depends on other concrete classes.
Without any configuration.
This only works if the class has no dependencies, or it only depends on other concrete classes.
Other tips:
🔥 Laravel tip: the sole method
Feb 15, 2022