Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Jul. 3rd 2017

PHP Bits: Invokable Classes

Episode 6 Run Time 6:06

Download

PHP's magic __invoke method is a useful tool to have in your belt, even if you likely won't reach for it too often. Any time that you want to piggy back on top of a closure, you may freely substitute an invokable class in its place. Let me show you how in this episode.