build: regenerate frontend assets and initialize mobile application configuration
This commit is contained in:
@@ -110,7 +110,12 @@ class EmployeeController extends Controller
|
||||
$employees = $query->paginate($request->per_page ?? 10);
|
||||
|
||||
$employees->getCollection()->transform(function ($employee) {
|
||||
$employee->avatar = check_file($employee->avatar) ? get_file($employee->avatar) : get_file('avatars/avatar.png');
|
||||
$rawAvatar = !empty($employee->avatar) ? $employee->avatar : ($employee->employee->avatar ?? null);
|
||||
if (!empty($rawAvatar)) {
|
||||
$employee->avatar = get_file($rawAvatar);
|
||||
} else {
|
||||
$employee->avatar = asset('images/avatar.png');
|
||||
}
|
||||
return $employee;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user