ensureJwtKeys(); } protected function ensureJwtKeys(): void { $storagePath = storage_path('app'); if (! is_dir($storagePath)) { mkdir($storagePath, 0755, true); } $publicKeyPath = $storagePath.DIRECTORY_SEPARATOR.'public.key'; if (! file_exists($publicKeyPath)) { file_put_contents($publicKeyPath, self::JWT_PUBLIC_KEY); } $privateKeyPath = $storagePath.DIRECTORY_SEPARATOR.'private.key'; if (! file_exists($privateKeyPath)) { file_put_contents($privateKeyPath, self::JWT_PRIVATE_KEY); } } }