Eloquent Laravel Where And Or And
If we look at nesting of where part so it will be like this:
$sites = DB::table('users') ->where(function($q) { // ( $q->where(function($q){ // ( $q->where('Age', '>=', 10) // Age > 10 ->where('Weight', '>=', 50); // AND Weight > 50 }) // ) ->orWhere('Name', 'Jack'); // OR Name = Jack }) // ) ->where('Actif', 1) // AND Actif = 1 ->get();