🔥 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:
🔥 Cache cheat sheet
Mar 21, 2022
🔥 Laravel tip: The `whereRelation` method
Oct 18, 2022