Easily turn a FQCN of an invokable class into a closure #47143
Unanswered
henzeb
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It may not be laravel related persé, but I do hope that one day the features in this package might end up in laravel framework, as I do need it all the time.
I present: https://packagist.org/packages/henzeb/closure
Imagine you have the following invokable class
whenever you have a method like:
You need to instantiate that class:
Quite annoying to my taste. With my package you can do the following:
And now you can use your invokable class like this:
There are also some functions available that utilizes the great power of binding if you need.
Beta Was this translation helpful? Give feedback.
All reactions