Vigyata.AI
Is this your channel?

New Sleep Class - 3 New Things Added - New In Laravel 10.10

2.5K views· 74 likes· 6:28· May 15, 2023

🛍️ Products Mentioned (7)

Here, we will be looking at 3 new things that are added to the latest version of Laravel which is v10.10.0 === OFFER === GET 30% DISCOUNT ON ALL PLANS OF CLOUDWAYS HOSTING FOR 3 MONTHS https://unified.cloudways.com/signup?id=1029148&coupon=CW30FOR3 === Important Links === Fonts, extensions I use, and Support Laratips links: https://bit.ly/m/laratips === Video Related Links === https://github.com/laravel/framework/compare/v10.9.0...v10.10.0 00:00 Intro 00:25 Add Sleep class https://github.com/laravel/framework/pull/46904 02:18 Add 'hashed' cast https://github.com/laravel/framework/pull/46947 03:40 Mark commands as isolatable https://github.com/laravel/framework/pull/46925 05:33 Cloudways Sponsorship === Other Videos === New In Laravel Playlist https://www.youtube.com/playlist?list=PL2DahmvUpeuu4UVWrcxlvVkMiI0SeS2OZ Laravel Package Development Playlist https://www.youtube.com/playlist?list=PL2DahmvUpeuu8HkpbNT-cKernolVdqZq_ Password Validation In Laravel with at least one Letters, Numbers, Upper and Lowercase or Symbols: https://youtu.be/f-g3P9imPZs Multiple Apis With ForwardsCalls Trait And Code Refactoring Tip - Laravel Hidden Feature: https://youtu.be/vzgNm86ezWE Laravel Chunking - You Might Be Doing This Wrong - Problem and Solution: https://youtu.be/aQCHmB4Uh0Q Laravel Tip - Properly Get Data Between Two Dates https://youtu.be/bJkEBTg1NGA Get Data From Multiple Databases In One Project | Laravel Tip https://youtu.be/KJAXLf78QPs === Attribution === Boy waving hand Video by VideoPlasty .com from Pixabay https://pixabay.com/users/videoplasty-19751245/?utm_source=link-attribution&utm_medium=referral&utm_campaign=video&utm_content=80696 #laravel #php #laraveltip #laratips #newinlaravel

About This Video

In this video I’m covering 3 new things that landed in Laravel v10.10.0, and I’m showing them in a practical way so you can actually use them right away. First up is the new Illuminate\Support\Sleep class. It’s basically like PHP’s sleep(), but the syntax is way more fluent and intuitive. You can sleep for seconds, minutes, milliseconds, and the best part is you can fake it in tests so your test suite doesn’t waste time waiting. Second, Laravel added a new 'hashed' cast. I demo it with a User password: if you save a plain password, it’ll go into the database as plain text (which you definitely don’t want). Previously you’d wrap it with Hash::make(), but now you can just cast the attribute as 'hashed' and Laravel will automatically hash it whenever you save. Third, I show how to mark Artisan commands as isolatable without having to pass the --isolated flag every time. You can just set a protected property like isolated = true, and Laravel will prevent multiple instances of that command from running at the same time—super useful for things like migrations or any “run only once” command.

Frequently Asked Questions

🎬 More from Laratips