public function fromUser($user, array $customClaims = [])
    {
        $payload = $this->makePayload($user->{$this->identifier}, $customClaims);

        return $this->manager->encode($payload)->get();
    }
public function fromUser($user, array $customClaims = [])
    {
        $payload = $this->makePayload($user->{$this->identifier}, $customClaims);

        return $this->manager->encode($payload)->get();
    }
public function fromUser ( $ user , array $ customClaims = [ ] ) { $ payload = $ this -> makePayload ( $ user -> { $ this -> identifier } , $ customClaims ) ; return $ this -> manager -> encode ( $ payload ) -> get ( ) ; }
Generate a token using the user identifier as the subject claim.

@param mixed $user
@param array $customClaims

@return string
Generate a token using the user identifier as the subject claim .