The latest Laravel 9.47 Release is now available new Eloquent collection visibility methods, added support for lazy collections with the batch fake, and more improvements and fixes.
setHidden methods have been added to Eloquent collections. The setVisible method is ideal for when you want to be explicit about the data you want to return while the converse setHidden is useful if you only have a few fields that you want explicitly hidden but generally want values visible by default.
There is now support for LazyCollection when using the withFakeBatch() with a Job in Laravel. There is now an easy way to mark singleton routes as “destroyable.” This type of route may be deleted, but it may not be created by default.
You can check out some Laravel 9.47 release examples showing the above features on this announce page.
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.