displayNameFieldName = "username"; } public static function scrape(string $username) { $data = app('JikanParser')->getUserProfile(new UserProfileRequest($username)); return json_decode( app('SerializerV4') ->serialize($data, 'json'), true ); } /** * Converts the model to an index-able data array. * * @return array */ public function toSearchableArray(): array { return [ 'id' => (string) $this->mal_id, 'mal_id' => (int) $this->mal_id, 'username' => $this->username ]; } public function typesenseQueryBy(): array { return [ "username" ]; } public function getTitleAttributeName(): string { return "username"; } }