[ '*' => self::JSON_STRUCTURE, ], 'links' => [ 'first', 'last', 'prev', 'next', ], 'meta' => [ 'current_page', 'from', 'path', 'per_page', 'to', ], ]; public function __construct(private Artist $artist) { parent::__construct($artist); } /** @return array */ public function toArray($request): array { return [ 'type' => 'artists', 'id' => $this->artist->id, 'name' => $this->artist->name, 'image' => $this->artist->image, 'created_at' => $this->artist->created_at, ]; } }