nested with laravel

29

Course::with('competencies', 'competencies.standards')->get()->toArray();
with('competencies.standards') is enough
$coursesAndComps = Course::with('competencies', 'competencies.standards')
                   ->get()->toArray();

Comments

Submit
0 Comments