php - Laravel Advanced Wheres how to pass variable into function? - Stack Overflow

PHOTO EMBED

Mon Feb 13 2023 03:20:37 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira

DB::table('users')->where(function ($query) use ($activated) {
    $query->where('activated', '=', $activated);
})->get();
content_copyCOPY

https://stackoverflow.com/questions/29548073/laravel-advanced-wheres-how-to-pass-variable-into-function