Fix database management things to actually work correctly.
This commit is contained in:
parent
580e5ac569
commit
63e39fbe58
14 changed files with 124 additions and 119 deletions
|
@ -93,4 +93,22 @@ class UserRepository extends SearchableRepository implements UserRepositoryInter
|
|||
|
||||
return $user->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function filterUsersByQuery($query)
|
||||
{
|
||||
$this->withColumns([
|
||||
'id', 'email', 'username', 'name_first', 'name_last',
|
||||
]);
|
||||
|
||||
$instance = $this->getBuilder()->search($query)->get($this->getColumns());
|
||||
|
||||
return $instance->transform(function ($item) {
|
||||
$item->md5 = md5(strtolower($item->email));
|
||||
|
||||
return $item;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue