public function secret() { $secret = $this->secret ?: getenv('JWT_SECRET'); if (!$secret) { throw new NoSecretException('Unable to find secret. Set using env variable JWT_SECRET'); } return $secret; }