protected function createMailSettings(Authenticatable $user, Token $token): array
    {
        Carbon::setLocale($this->config->get('app.locale', 'en'));
        $expiry = $this->getTokenExpiry();

        $route = $this->generateRoute($token);

        return [
            'to'            => [['email' => $token->email, 'name' => $user->username ?? $token->email]],

            'view'          => $this->config->get("laranixauth.{$this->configKey}.mail.view"),
            'subject'       => $this->config->get("laranixauth.{$this->configKey}.mail.subject"),
            'markdown'      => $this->config->get("laranixauth.{$this->configKey}.mail.markdown", true),

            'userId'        => $user->getAuthIdentifier(),
            'username'      => $user->username,
            'firstName'     => $user->first_name,
            'lastName'      => $user->last_name,
            'fullName'      => $user->full_name,

            'token'         => $token->token,
            'expiry'        => $expiry->format('jS F Y g:i:sA T'),
            'humanExpiry'   => $expiry->diffForHumans(null, true),
            'url'           => $route,
            'baseurl'       => substr($route, 0, strpos($route, '?')),
        ];
    }
protected function createMailSettings(Authenticatable $user, Token $token): array
    {
        Carbon::setLocale($this->config->get('app.locale', 'en'));
        $expiry = $this->getTokenExpiry();

        $route = $this->generateRoute($token);

        return [
            'to'            => [['email' => $token->email, 'name' => $user->username ?? $token->email]],

            'view'          => $this->config->get("laranixauth.{$this->configKey}.mail.view"),
            'subject'       => $this->config->get("laranixauth.{$this->configKey}.mail.subject"),
            'markdown'      => $this->config->get("laranixauth.{$this->configKey}.mail.markdown", true),

            'userId'        => $user->getAuthIdentifier(),
            'username'      => $user->username,
            'firstName'     => $user->first_name,
            'lastName'      => $user->last_name,
            'fullName'      => $user->full_name,

            'token'         => $token->token,
            'expiry'        => $expiry->format('jS F Y g:i:sA T'),
            'humanExpiry'   => $expiry->diffForHumans(null, true),
            'url'           => $route,
            'baseurl'       => substr($route, 0, strpos($route, '?')),
        ];
    }
protected function createMailSettings ( Authenticatable $ user , Token $ token ) : array { Carbon :: setLocale ( $ this -> config -> get ( 'app.locale' , 'en' ) ) ; $ expiry = $ this -> getTokenExpiry ( ) ; $ route = $ this -> generateRoute ( $ token ) ; return [ 'to' => [ [ 'email' => $ token -> email , 'name' => $ user -> username ?? $ token -> email ] ] , 'view' => $ this -> config -> get ( "laranixauth.{$this->configKey}.mail.view" ) , 'subject' => $ this -> config -> get ( "laranixauth.{$this->configKey}.mail.subject" ) , 'markdown' => $ this -> config -> get ( "laranixauth.{$this->configKey}.mail.markdown" , true ) , 'userId' => $ user -> getAuthIdentifier ( ) , 'username' => $ user -> username , 'firstName' => $ user -> first_name , 'lastName' => $ user -> last_name , 'fullName' => $ user -> full_name , 'token' => $ token -> token , 'expiry' => $ expiry -> format ( 'jS F Y g:i:sA T' ) , 'humanExpiry' => $ expiry -> diffForHumans ( null , true ) , 'url' => $ route , 'baseurl' => substr ( $ route , 0 , strpos ( $ route , '?' ) ) , ] ; }
Create email options

@param \Illuminate\Contracts\Auth\Authenticatable|User   $user
@param \Laranix\Auth\User\Token\Token|null               $token
@return array
Create email options