Laravel News
Follow
Asset Prefetching Strategies with Vite in Laravel 11.21
Laravel v11.21 introduces various enhancements:- Eager Asset Prefetching for Vite: Optimized network performance for SPA front-ends by prefetching assets generated by Vite.
- Improved expectsChoice() Assertion: Simplified syntax for testing choices with associative arrays.
- Force Destroying Soft-deleted Models: Added forceDestroy() method to directly remove soft-deleted records.
- countBetween() for AssertableJson: Added between() assertion to verify items within a specified range.
- Resource() Method for HTTP Client Response: Provided a resource() method to access the response body as a PHP stream.
- withoutHeaders() Test Helper: Simplified removal of headers during test requests.
- Auto-secure Cookies: Cookies are now automatically secured with "SameSite=Lax" and "Secure" attributes.
- Enhanced DB Inspection Commands: Improved output and options for db:inspect and db:schema:dump commands.
- Support for Attributes in app()->call(): Attributes can now be passed to methods invoked using app()->call().
- Typing Enhancements for HigherOrderCollectionProxy: Improved type safety and code readability for collections.