If every asset will be linked to only one parent lesson, and every lesson will be linked to only one course, then all of your relations are one-o-many Check the official documentation here: https://laravel.com/docs/master/eloquent-relationships#one-to-... And don't forget to define the inverse relations as well.
either use eloquent relationships or use inner join's in mysql via DB::query
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.