Loading video...
Video Failed to Load
Property hooks, one of the new features in PHP 8.4, can remove the need for traditional getter and setter methods entirely. Got 5 minutes for me to show you the essentials?
36,044 views • 1 year ago •via X (Twitter)
5 Comments

Laracasts1 year ago
And if you'd like to review this in greater detail, we cover it on Laracasts today.

Tony Lea1 year ago
Love this format. You should do Laracasts on TikTok 🤙

Stephan Robert1 year ago
I think i'll keep the "old" way of doing things. I think that properties initialisation place should be as clean as possible ( and explicit ). For a simple setter, sure, it looks fine, but when you have something like your example, it just hit you in the face. Don't throw rocks.

iSajadUlMulk1 year ago
@jwmcpeak That's amazing, I already have used them in C# quite alot, somehow it seems like this idea being borrowed from there .. 😂😂😂 no offense

Punjabi Lad1 year ago
we can officially say goodbye to boilerplate getter & setter methods!

