with-join
with-join copied to clipboard
Doesn't works for subconditions
Example: ...
->includes(['states' => function($query) use ($stateNamesList){
$query
->whereIn('id', function($query) use ($stateNamesList) {
$query
->selectRaw('max(id)')
->from(\App\ScenarioState::tableName())
->groupBy('client_id');
})
->whereIn('name', $stateNamesList);
}])
Gives: Call to undefined method SleepingOwl\WithJoin\WithJoinEloquentBuilder::includes()