Laravel, an open-source PHP web framework, was released in 2011 & has recently released 8.53 with immutable date, datetime casting, a queue monitoring command, along with recent changes in the 8.x branch.

Let’s understand the new changes that were rolled out on 5th August 2021.

Immutable Date and Datetime Casting in Laravel 8.53

‘immutable_date’ & ‘immutable_datetime’ are two new model casts that provide support for all current date/datetime functionality, but return a ‘CarbonImmutable’ instance instead of ‘Carbon’. You can refer to the Date Casting document to get started with date casting.

 Laravel 8.53: Immutable Date and Datetime Casting

Queue Monitoring Artisan Command in Laravel 8.53

A new artisan command, ‘queue:monitor’ will check the sizes of all the queues provided and output them in a console.

Queue Monitoring Artisan Command

A twiceDailyAt Scheduler Method 

The next change is a ‘twiceDailyAt’ which is a scheduler frequency that allows setting the specific minutes past an hour to run at:

Laravel 8.53 A twiceDailyAt Scheduler Method

“Accepted If” Validation Rule 

‘Accepted_if’ validation rule is highly useful for validating terms of service & other similar confirmation flows. It means a field that must be “truthy” if another field validation is equal to a specific value.

Laravel 8.53 "Accepted If" Validation Rule

 

 

For more interesting updates  on PHP, Laravel, coding, SEO  and marketing, follow us!

Share this article