Laravel's latestOfMany(): Take caution when using scopes.

preview_player
Показать описание
In your Laravel app you should take caution when using scopes along with latestOfMany() as there are side effects you'll experience which will lead you to think you have a bug in your Eloquent relationships.

Follow me on Twitter @jordankdalton
Комментарии
Автор

recommended by laravel daily, good explanation .

mohidden
Автор

Welcome to Youtube Jordan!. Are you on discord/other platform by any chance?

benjames
Автор

2:13
"as an idea, you can have a license that renews and you get a new license, well we need to have
that information, track it over history only one we really care about is the latest that there is"

I'm curious how you handle the logic behind this, let's say I want to edit the information of my latest `license`. I click `edit` --update something-- and then click save, I'm curious about what's happening behind the scenes after I click save.

NathanaelZhang