BLOG

“I still suggest you call
this page 42Lab.
Works for both of us!”
- Joey

New Launch: Immutable Date Casting In Laravel 8.53

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

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!

42 works

Why do Market Leaders rely on Social Listening?

Read Blog

42Works announces COVID-19 relief measures for all its team members

Read Policy
42 works
Get 42Works Blog updates in your Inbox!

    Washington United States 157.55.39.61 https://42works.net/new-launch-immutable-date-casting-in-laravel-8-53/