Group Scope for Parent/Nested Relations
sqwk opened this issue · comments
sqwk commented
I have three models; client, project and task. Task belongs to project, project belongs to client. (Task has a db column project_id
and project has a db column client_id
.)
I can create a group filter scope for task belonging to project. Is it possible to also create a group filter scope for a more distant relation? (Effectively a belongsToThrough
relation, which is not implemented in Laravel.) Showing a column value in a list can be realised through an accessor, implementing a scope unfortunately does not work this way.
In case this is a feature request, this would be a syntax suggestion:
client:
type: group
nameFrom: name
modelClass: [Namespace\Plugin\Models\Project, Namespace\Plugin\Models\Client]