I have this example field in my Users:
agenda:
- local: Brasil
date: de 9 a 10-jun
- local: Argentina
date: de 20 a 25-ago
- local: Venezuela
date: sob agenda
Now I want to list only the users that has āagenda[ālocalā]ā == 'Brasilā
how to do that?
I tried this:
$collection = $site->users()->filter(function($p) {
return $p->toStructure()->agenda()->local() == 'Brasil';
});
and this:
$users = $site->users()->agenda()->toStructure()->filterBy('local', 'Brasil');
But none worksā¦
Anyone can help me?! Thanks!