xxxxxxxxxx
$projects = Project::whereHas('projectOffers', function ($offer) {
$offer->where('teacher_id', "Ahmed");
$offer->where('status_id', "Accepted");
})->where('status_id', "inprogress")->get();
xxxxxxxxxx
Event::with(["participants" => function($q){
$q->where('participants.IdUser', '=', 1);
}])
xxxxxxxxxx
Event::with(["participants" => function($q){
$q->where('participants.IdUser', '=', 1);
}])
xxxxxxxxxx
$users = DB::table('users')
->whereDate('created_at', '2016-12-31')
->get();
xxxxxxxxxx
$users = DB::table('user')->select('id', 'name', 'email','api_token','created_at')
->where('email' , $email)
->where('name' , $name)
->get();
xxxxxxxxxx
$users = DB::table('user')->select('id', 'name', 'email','api_token','created_at')->where('email' , $email)->get();
return response()->json($users);