AgentProfile
extends Out
in package
A lightweight, read-only wrapper around a single `GET /agent/{agent_id}` response (the `AgentProfileOut` schema): one agent's full story.
Tags
Table of Contents
Properties
- $agent : array<string|int, mixed>
- $discoveries : array<string|int, mixed>
- $milestones : array<string|int, mixed>
- $recent : array<string|int, mixed>
- $vehicle_count : int
- $vehicles : array<string|int, mixed>
- $fillable : mixed
Methods
- fill() : void
- Stores the full decoded payload, then applies any declared attribute mutators. Unlike the parent, keys absent from `$fillable` are preserved so the model tolerates the extra keys the NHA API is allowed to add.
- jsonSerialize() : array<string|int, mixed>
- Serialises back to the full raw payload (lossless), not just the declared subset, so round-tripping an NHA response never discards fields.
Properties
$agent
public
array<string|int, mixed>
$agent
Core stats + inventory.
$discoveries
public
array<string|int, mixed>
$discoveries
Recipes/inventions credited to this agent.
$milestones
public
array<string|int, mixed>
$milestones
This agent's milestone timeline.
$recent
public
array<string|int, mixed>
$recent
Recent actions.
$vehicle_count
public
int
$vehicle_count
Number of owned vehicles.
$vehicles
public
array<string|int, mixed>
$vehicles
Owned vehicles.
$fillable
protected
mixed
$fillable
= ['agent', 'vehicles', 'vehicle_count', 'discoveries', 'milestones', 'recent']
Tags
Methods
fill()
Stores the full decoded payload, then applies any declared attribute mutators. Unlike the parent, keys absent from `$fillable` are preserved so the model tolerates the extra keys the NHA API is allowed to add.
public
fill(array<string|int, mixed> $attributes) : void
Parameters
- $attributes : array<string|int, mixed>
-
The decoded response body.
jsonSerialize()
Serialises back to the full raw payload (lossless), not just the declared subset, so round-tripping an NHA response never discards fields.
public
jsonSerialize() : array<string|int, mixed>