mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-03 14:19:31 +00:00
26 lines
693 B
PHP
26 lines
693 B
PHP
<?php
|
|
|
|
namespace Anikeen\Id\Concerns;
|
|
|
|
use Throwable;
|
|
|
|
trait ManagesProfile
|
|
{
|
|
use HasBillable;
|
|
|
|
/**
|
|
* Get the profile url for the current user.
|
|
*
|
|
* @param string|null $returnUrl The URL to redirect to after the user has completed their profile.
|
|
* @param array $options Additional options for the profile URL.
|
|
* @return string
|
|
* @throws Throwable
|
|
*/
|
|
public function profilePortalUrl(?string $returnUrl = null, array $options = []): string
|
|
{
|
|
return $this->anikeenId()->request('POST', 'v1/user/profile', [
|
|
'return_url' => $returnUrl,
|
|
'options' => $options,
|
|
])->data->url;
|
|
}
|
|
} |