with-join icon indicating copy to clipboard operation
with-join copied to clipboard

Doesn't works for subconditions

Open LanKing opened this issue 5 years ago • 0 comments

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()

LanKing avatar May 18 '19 04:05 LanKing