Howdy. I have nested resource controllers, like so:
http://example.org/v1/jobs/1/departments
My issue is trying to query all departments associated with job 1 using the ORM.
All relevant code, along with the error, is here:
https://gist.github.com/morganhein/9254678
How do I do this?
how about trying the following:
$positions = Auth::user()->jobs()->where('job_id', '=',$jobId)->first()->departments();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community