So I went to read up on some Laravel documentation regarding Homestead because you know, Docker on Mac, arghhh, well that is a story for another day. Anyway, Laravel 9 is out and one of the features that stood out for me was the support for generic types. If you do not know what these are, there is a great article by Ondřej Mirtes regarding them https://phpstan.org/blog/generics-in-php-using-phpdocs. What does this have to do with Laravel?

Consider the code below, I have been using generic type hinting for a while in my code, more in a documentation capacity.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners