Querying Eloquent Relationships in Effective Way

  Рет қаралды 14,942

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер: 13
@joshuaheathcote2116
@joshuaheathcote2116 2 жыл бұрын
Eloquent makes working with the DB a joy.
@bl1ngy628
@bl1ngy628 3 жыл бұрын
Best video to understand Eloquent Relationships, thank you !
@teamadevelopment
@teamadevelopment 5 жыл бұрын
Marvelous! I haven't used "has' and 'whereHas' clauses so far, but now I'll give it a try with precaution! :D
@rfpdl
@rfpdl 5 жыл бұрын
Did not know you can chain dd() to the query itself. Thank you
@kampus93
@kampus93 4 жыл бұрын
sir please make video for 3 table query or more in eloquent...
@janussQv
@janussQv 5 жыл бұрын
Be careful using whereHas with deep nesting, it can be really demanding, if you're not careful, or the database design sucks. Use DB query logging while developing, e.g. tools like barryvdh/laravel-debugbar or a simple DB::listen( function ($event) { if ($event->time > 2500 || env('LOG_ALL_QUERIES')) { Log::info('LONG QUERY: ' . $event->time . ' -> ' . $event->sql); }}); somewhere in the code you are interested in.
@tothebone4613
@tothebone4613 2 жыл бұрын
i have "seaman and status model, has many relation" i want to see list of seaman that have spesific status on each status view like Ready to go, unscheduled, onboard etc. any suggest ?
@dmdk8301
@dmdk8301 3 жыл бұрын
Is it normal to query Author within Bookcontroller? I am a bit confused again. What should be next? I mean attach books to author in order to display? Or i blade? Its common for me and trying to avoid this sometimes i stuck and loose time.
@rhnnf3502
@rhnnf3502 3 жыл бұрын
Thanks! Really helpful videos :)
@nareshvadhavana9273
@nareshvadhavana9273 4 жыл бұрын
High rate of full course
@spraydeveloper5452
@spraydeveloper5452 3 жыл бұрын
Hello, can you please explain the difference betwen Users::groups() and Users::with('groups'), I read that is Eager Loads, but i dont inderstand it fully, thank you :)
@PovilasKorop
@PovilasKorop 3 жыл бұрын
Well, it's returning different things. User::groups() immediately returns the GROUPS, and User::with('groups') returns USERS with those groups, and then you can do some more filtering for those users. Not sure I'm explaining clearly, I hope you understand.
5 tips for supercharged Laravel Eloquent queries
16:29
Andrew Schmelyun
Рет қаралды 68 М.
Laravel: BelongsTo vs Polymorphic? Let's Test!
14:09
Laravel Daily
Рет қаралды 26 М.
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 49 МЛН
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 14 МЛН
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20
Eloquent Observers or Events Listeners? Which is Better?
8:24
Laravel Daily
Рет қаралды 60 М.
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 140 М.
9 Tips for Shorter Laravel Code
10:16
Laravel Daily
Рет қаралды 61 М.
Cache Eloquent Query Results to Load Pages Instantly
5:43
Laravel Daily
Рет қаралды 60 М.
Laravel Migrations: 12 Useful Tips in 12 Minutes
12:06
Laravel Daily
Рет қаралды 79 М.
Optimizing Eloquent: Running Out Of Memory?
6:11
Laravel Daily
Рет қаралды 43 М.
Cursor Is Beating VS Code (...by forking it)
18:00
Theo - t3․gg
Рет қаралды 63 М.
Laravel HasMany: Delete Parent - What Happens with Children?
10:51
Laravel Daily
Рет қаралды 20 М.
Optimizing Big E-Shop Homepage: from 2.5s to 0.4s
5:48
Laravel Daily
Рет қаралды 22 М.
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 49 МЛН