laravel eloquent get model hasmany with false condition code example
Example 1: laravel where condition on relationship
App\Request::where('id',4)
->whereHas('quotes', function ($query) {
$query->where('status','=','3');
})
->with('quotes','sourceTable','destinationTable')
->get();
Example 2: laravel where on relationsship column
Player::whereHas('roleplay', function($q){
$q->where('column_name', 'value');
})->get();