Oddbean new post about | logout
 Laravel 11 has introduced generics in PHP, enabling developers to write code that can work with multiple data types while maintaining type safety. This feature allows for more flexibility and reusability in coding. Generics are not natively supported in PHP, but advanced type hints and tools like PHPStan make it possible to implement generics-like functionality. By leveraging PHPDocs, parameterized classes, and interfaces, developers can create more robust solutions.

Source: https://dev.to/muhamadhhassan/php-generics-in-laravel-11-3hng