Open crofton77 opened 10 years ago
You could do something like this:
public function configureFilters($mapper)
{
$users = [];
foreach (User::groupBy('email')->get() as $user) {
$users[$user->email] = $user->email;
}
$mapper->select('email')->options($users);
}
This allows me to a user to filter by different users.
How do I make so the user can only see items they created?
How would I create a filter to only show items created by a user?
Also how would i set the user's id on save so it can be stored in database?