123456789101112131415161718192021222324252627 |
- <?php
- namespace App\Http\Resources\API;
- use Illuminate\Http\Request;
- class SystemOperationLogResource extends BaseResource
- {
- /**
- * Transform the resource into an array.
- *
- * @return array<string, mixed>
- */
- public function toArray(Request $request): array
- {
- return [
- 'id' => $this->id,
- 'ip' => $this->ip,
- 'user' => new UserProfileResource($this->user),
- 'url' => $this->url,
- 'method' => $this->method,
- 'browser' => $this->browser,
- 'platform' => $this->platform,
- 'request_at' => (string)$this->request_at,
- ];
- }
- }
|