Skip to content

Commit

Permalink
Add setAttributes() method for better customizability. Might be usefu…
Browse files Browse the repository at this point in the history
…l in multi user journey flow.
  • Loading branch information
ziming committed Jul 5, 2022
1 parent bd15739 commit c236c5d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/LaravelMyinfoSg.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,13 @@ private function createPersonRequest(string $sub, string $validAccessToken): \Ps

return $response;
}

public function setAttributes(array|string $attributes)
{
if (is_string($attributes)) {
$this->attributes = $attributes;
} elseif (is_array($attributes)) {
$this->attributes = join(',', $attributes);
}
}
}

0 comments on commit c236c5d

Please sign in to comment.