How to pass a variable in join query in Laravel
I have a variable that I would like to pass in a joined RAW query. How can I do that ? $current_user_id = Auth::user()->id; $query = DB::table('users as u') ->selectRaw(' ROW_NUMBER() OVER (ORDER BY u.id) AS No, u.id, u.username, l.level…