22 lines
456 B
PHP
22 lines
456 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class AuditLogResource extends JsonResource
|
|
{
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'action' => $this->action,
|
|
'actor_name' => $this->user?->name ?? 'System',
|
|
'created_at' => $this->created_at,
|
|
];
|
|
}
|
|
}
|