Level 70
It's called dependency injection in PHP. In a nutshell, it's like calling a class without instantiation.
Refer you to read following articles-
4 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi! can anyone please explain in brief about how objects communicate in this cahpter ( https://www.laracasts.com/series/object-oriented-bootcamp-in-php/episodes/5?autoplay=true ). I tried many time but still getting confused in it.
Few things like:
class Business { public function hire ( Person $person) {
}
}
theses things like why you write Person in the function like that.
Thanks
It's called dependency injection in PHP. In a nutshell, it's like calling a class without instantiation.
Refer you to read following articles-
Please or to participate in this conversation.