Quantcast
Viewing all articles
Browse latest Browse all 14

Answer by Hari Pudyal for Laravel Eloquent "WHERE NOT IN"

The dynamic way of implement whereNotIn:

 $users = User::where('status',0)->get();    foreach ($users as $user) {                $data[] = $user->id;            }    $available = User::orderBy('name', 'DEC')->whereNotIn('id', $data)->get();

Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>