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-many 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!
The Laravel portal for problem solving, knowledge sharing and community building.
The community