src/Primitive/String/String.php
public function encrypt($key, $expires)
    {
        $payload = [
            'exp' => $this->getIntegerable($expires),
            'string' => $this->string
        ];

        return JWT::encode($payload, $this->getStringable($key));
    }
public function encrypt($key, $expires)
    {
        $payload = [
            'exp' => $this->getIntegerable($expires),
            'string' => $this->string
        ];

        return JWT::encode($payload, $this->getStringable($key));
    }
Encrypt and sign a String into a JWT token.

@param string|StringContract $key to encrypt with
@param int|IntegerContract $expires timestamp
@return static