Skip to content

Is there a way to filter an association? #354

Open
@pmtarantino

Description

@pmtarantino

Let's say I have Teams and Players, with a Player belonging to a Team (with team_id), and each Player has a birthdate.

And I have,

$team = Team::find(1);
$team->players;

which gave me all the players. What if I want players born after 1990?

This doesn't work:

$team->players(array('conditions' => ...) ) ;

Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions