Quantcast
Channel: Laravel Eloquent "WHERE NOT IN" - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by Stefan Pavlov for Laravel Eloquent "WHERE NOT IN"

$
0
0

This is my working variant for Laravel 7

DB::table('user')                   ->select('id','name')  ->whereNotIn('id', DB::table('curses')->where('id_user', $id)->pluck('id_user')->toArray())  ->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>