with where eloquent code example
Example 1: eloquent where in
$users = DB::table('users')->whereIn('id', array(1, 2, 3))->get()
Example 2: laravel with and where
$projects = Project::whereHas('projectOffers', function ($offer) {
$offer->where('teacher_id', "Ahmed");
$offer->where('status_id', "Accepted");
})->where('status_id', "inprogress")->get();