Vigyata.AI
Is this your channel?

New Way To Define HasManyThrough Relationship - 5 New Things Added - New in Laravel 9.51.0

2.4K views· 74 likes· 8:19· Feb 12, 2023

🛍️ Products Mentioned (9)

Here, we will be looking at 5 new things that are added to the latest version of Laravel which is v9.50.0 and v9.51.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/v9.49.0...v9.51.0 00:00 Intro 00:22 Add @style Blade directive https://github.com/laravel/framework/pull/45887 02:07 Adds database query count test expectation helper https://github.com/laravel/framework/pull/45932 04:58 Add pending has-many-through and has-one-through builder https://github.com/laravel/framework/pull/45894 07:02 Add uri templates to Http client https://github.com/laravel/framework/pull/45982 07:33 Update facade script to guess docblock FQCNs https://github.com/laravel/framework/pull/45896 === Other Videos === What's New In Laravel 9 https://youtu.be/qAzrZUG_9Z0 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 5 new things added in Laravel v9.50.0 and v9.51.0 (I combined both releases), and honestly it feels like one of the last Laravel 9 updates because Laravel 10 is about to drop. I walk through each change with small, practical examples so you can quickly see what’s new and how you’d actually use it in a real app. First, I test the new @style Blade directive, which works similar to @class: you can conditionally output inline styles, and Laravel even helps with semicolons (you only need to be careful when you add multiple rules like padding). Then I show a testing helper that lets you “expect database query count” so you can catch N+1 issues in PHPUnit—super useful for performance and scaling. After that, I demo the new, more readable has-many-through syntax using through()->has() (I genuinely find it easier to read). Finally, I show URI templates in the HTTP client so you don’t have to manually concatenate URLs, and I end with a tooling improvement: the facade script can now guess docblock FQCNs so the team doesn’t have to keep updating those manually (for core facades).

Frequently Asked Questions

🎬 More from Laratips