php - WhereNotExists Laravel Eloquent -


little bit of trouble eloquent framework laravel.

i need replicate query :

select * repairjob not exists (select repair_job_id     dismissedrequest     repairjob.id = dismissedrequest.repair_job_id); 

right have

 $repairjobs = repairjob::with('repairjobphoto', 'city', 'vehicle')->where('active', '=', 'y')->wherenotexists('id', [dismissedrequest::all('repair_job_id')])->get(); 

anyone idea? need repairjobs there no record in dismissed requests table

i error when using query above

argument 1 passed illuminate\database\query\builder::wherenotexists() must instance of closure, string given 

try doesnthave() method. assuming 'dismissedrequests' relation name in repairjob model.

$jobs = repairjob::with('repairjobphoto', 'city', 'vehicle')     ->where('active', 'y')->doesnthave('dismissedrequests')->get(); 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -