laravel where condition on relationship
AppRequest::where('id',4)
->whereHas('quotes', function ($query) {
$query->where('status','=','3');
})
->with('quotes','sourceTable','destinationTable')
->get();
laravel where condition on relationship
AppRequest::where('id',4)
->whereHas('quotes', function ($query) {
$query->where('status','=','3');
})
->with('quotes','sourceTable','destinationTable')
->get();
condition for both of one should be true laravel eloquent
WHERE age < 6 OR (age > 8 AND name IN ('Jane', 'Jerry'))
return AppDogs::select('name', 'age')
->where('age','<', 6)
->orWhere(function($q){
$q->where('age','>', 8);
$q->whereIn('name', ['Jane', 'Jerry']);
})
->get();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us