Best video to understand Eloquent Relationships, thank you !
@teamadevelopment5 жыл бұрын
Marvelous! I haven't used "has' and 'whereHas' clauses so far, but now I'll give it a try with precaution! :D
@rfpdl5 жыл бұрын
Did not know you can chain dd() to the query itself. Thank you
@kampus934 жыл бұрын
sir please make video for 3 table query or more in eloquent...
@janussQv5 жыл бұрын
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.
@tothebone46132 жыл бұрын
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 ?
@dmdk83013 жыл бұрын
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.
@rhnnf35023 жыл бұрын
Thanks! Really helpful videos :)
@nareshvadhavana92734 жыл бұрын
High rate of full course
@spraydeveloper54523 жыл бұрын
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 :)
@PovilasKorop3 жыл бұрын
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.