- Create a new Blade view for domain registration (`registrant-tochuc.blade.php`) to capture organization and manager details. - Implement email templates for new domain orders for both admin (`domain-order-new.blade.php`) and customers (`domain-order-received.blade.php`). - Add CSV exports for client and domain data. - Introduce tests for customer mass assignment, password reset, login throttling, and permission gating. - Ensure service renewals use current pricing and validate ownership for virtual machines. - Validate mass assignment behavior in service model.
25 lines
687 B
PHP
25 lines
687 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\Api\Admin;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class AdminUserResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'username' => $this->username,
|
|
'email' => $this->email,
|
|
'firstname' => $this->firstname,
|
|
'lastname' => $this->lastname,
|
|
'phone' => $this->phone,
|
|
'department' => $this->department,
|
|
'start_date' => $this->start_date?->toDateString(),
|
|
'roles' => $this->getRoleNames(),
|
|
];
|
|
}
|
|
}
|