$camps = $field->camps()->where('status', 0)->where(function ($q) {
$q->where('sex', Auth::user()->sex)->orWhere('sex', 0);
})->get();
MyMode::where(['user_id' => 1])
->orWhere(['assigned_to' => 1])
->get();
$users = DB::table('users')
->whereDate('created_at', '2016-12-31')
->get();
$users = Users::whereIn('id', array(1, 2, 3))->get()
$users = DB::table('user')->select('id', 'name', 'email','api_token','created_at')
->where('email' , $email)
->where('name' , $name)
->get();
$projects = Project::whereHas('projectOffers', function ($offer) {
$offer->where('teacher_id', "Ahmed");
$offer->where('status_id', "Accepted");
})->where('status_id', "inprogress")->get();
$users = DB::table('users')->whereIn('id', array(1, 2, 3))->get()
$users = DB::table('user')->select('id', 'name', 'email','api_token','created_at')->where('email' , $email)->get();
return response()->json($users);
Table::where('Column', Value)->where('NewColumn', Value)->get();
$users = DB::table('users')
->whereMonth('created_at', '12')
->get();
if (!empty($search)){
$member = $member->where(function($q)use($search){$q->where('name', 'LIKE', '%' . $search . '%')->orWhere('contact', 'LIKE', '%' . $search . '%')->orWhere('contact02', 'LIKE', '%' . $search . '%')->orWhere('email', 'LIKE', '%' . $search . '%')->orWhere('blood_group', 'LIKE', '%' . $search . '%'); });
}