12345678910111213141516171819202122232425262728 |
- <?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,
- 'display_id' => $this->display_id,
- ];
- }
- }
|