DONE: layout letter with letterhead and footer, notification for newly...
This commit is contained in:
@@ -32,12 +32,43 @@ class UserService
|
||||
);
|
||||
}
|
||||
|
||||
public function getDeletedPaginatedList(
|
||||
int $perPage,
|
||||
string $search,
|
||||
string $status,
|
||||
string $sortBy,
|
||||
string $sortOrder
|
||||
): LengthAwarePaginator {
|
||||
return $this->repository->getDeletedWithRelationsPaginated(
|
||||
$perPage,
|
||||
$search,
|
||||
$status,
|
||||
$sortBy,
|
||||
$sortOrder
|
||||
);
|
||||
}
|
||||
|
||||
public function restoreUser(string $id): ?User
|
||||
{
|
||||
if (! $this->repository->restore($id)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->repository->findById($id);
|
||||
}
|
||||
|
||||
public function getUserWithRelations(string $id): ?User
|
||||
{
|
||||
$user = $this->repository->findById($id);
|
||||
|
||||
if ($user) {
|
||||
$user->load(['roles.permissions']);
|
||||
$user->load([
|
||||
'roles.permissions',
|
||||
'addresses',
|
||||
'employments',
|
||||
'bankDetails.bank',
|
||||
'heirs',
|
||||
]);
|
||||
}
|
||||
|
||||
return $user;
|
||||
|
||||
Reference in New Issue
Block a user