Could you elaborate a little bit more on that? I believe is a relationship between Score and Cycle, so far I do have a field in Score which is cycle_id, I have in Scores a relationship with Dependencies, could I have two or more to different models entities?
I manage to make it work using a JOIN but now its not getting the Prizes information, any ideas?
App\Sector::with( array('dependencies' => function($query) { $query->with( array('scores' => function($query){ $query->join('cycles', 'scores.cycle_id', '=', 'cycles.id')->where( DB::raw('YEAR(cycles.starts)'), '=', '2016')->with('prizes'); }) ); }) )->get();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community