Hi can ask some help on this raw query it has no output,
$userproj_id = UserProject::select('projid')->where('user_id', $id)->get()->toArray();
$flattenid = array_flatten($userproj_id);
foreach ($flattenid as $projid) {
$projidarr [] = $projid;
}
$users = DB::select('select * from project where projid in ( ? ) and user_id = 3 ', $projidarr );
but if I will manually do like this, it works fine..
$users = DB::select('select * from project where projid in ( ? ) and user_id = 3 ', ['12345']);
but when I do this manually no output again.
$users = DB::select('select * from project where projid in ( ? ) and user_id = 3 ', ['12345','11111']);
Thank you in advance.