Skip to content

Doesn't works for subconditions #21

@LanKing

Description

@LanKing

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions