php - Laravel WhereIn not working as expected -


i have problem using laravel wherein. i'm trying write query

select * voters pollingstation_id in (select pollingstation_id pollingstation_shehia word_id = 103) 

i tried 2 ways , both ways same error, when dd can see array of returned

here error when return view

(2/2) errorexception unexpected data found. unexpected data found. data missing (view: c:\xampp\htdocs\cufelection\resources\views\voters\voterswordlist.blade.php)

here when dd

collection {#2929 ▼   #items: array:2648 [▶] } 

and here query

$voters = voter::wherein('pollingstation_id', function($query) use($id) {         $query->from('pollingstation_shehia')               ->where('word_id', $id)               ->select('pollingstation_id'); })->get(); 


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -