Комментарии:
Eloquent makes working with the DB a joy.
Ответить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 ?
Ответитьsuper as always
ОтветитьBest video to understand Eloquent Relationships, thank you !
Ответить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 :)
Ответить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.
Thanks! Really helpful videos :)
Ответитьsir please make video for 3 table query or more in eloquent...
ОтветитьHigh rate of full course
ОтветитьDid not know you can chain dd() to the query itself. Thank you
Ответить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.
Marvelous! I haven't used "has' and 'whereHas' clauses so far, but now I'll give it a try with precaution! :D
Ответить