1$projects = Project::whereHas('projectOffers', function ($offer) {
2 $offer->where('teacher_id', "Ahmed");
3 $offer->where('status_id', "Accepted");
4 })->where('status_id', "inprogress")->get();
1$users = DB::table('users')
2 ->whereDate('created_at', '2016-12-31')
3 ->get();