PHPackages                             wyn/laravel-google-secret-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wyn/laravel-google-secret-manager

ActiveLibrary

wyn/laravel-google-secret-manager
=================================

Manage environment secrets using Google Secrets Manager (GSM).

v1.1.0(1y ago)2152↓100%MITPHPPHP ^7.3|^8.0

Since Jul 21Pushed 1y ago2 watchersCompare

[ Source](https://github.com/wahyuyn/laravel-google-secret-manager)[ Packagist](https://packagist.org/packages/wyn/laravel-google-secret-manager)[ RSS](/packages/wyn-laravel-google-secret-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Laravel - Google Secret Manager
===============================

[](#laravel---google-secret-manager)

A Laravel package to manage and integrating environment secrets using Google Secrets Manager (GSM)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require wyn/laravel-google-secret-manager
```

Publish Config:

```
php artisan vendor:publish --provider="wyn\GoogleSecretManager\GoogleSecretManagerServiceProvider"
```

Configuration
-------------

[](#configuration)

#### Set Up Google Cloud Project:

[](#set-up-google-cloud-project)

- Ensure you have a Google Cloud project set up.
- Enable the Secret Manager API for your project.
- Create secrets in the Secret Manager as needed.

#### Add Environment Variables:

[](#add-environment-variables)

Add your Google Cloud project ID and secret ID to your .env file:

```
GOOGLE_PROJECT_ID=your-google-cloud-project-id
GOOGLE_SECRET_ID=your-secret-id

```

#### Google Credentials:

[](#google-credentials)

Ensure your application has access to your Google Cloud credentials. You can set the GOOGLE\_APPLICATION\_CREDENTIALS environment variable to point to your service account JSON key file:

```
GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/service-account-file.json

```

Usage
-----

[](#usage)

#### Injecting Secrets into Environment Variables

[](#injecting-secrets-into-environment-variables)

You can inject secrets into environment variables using the injectSecretToEnv method.

```
use Illuminate\Support\Facades\App;$secretManager = App::make('google.secret.manager');
// Inject the secret into environment variables
$secretManager->injectSecretToEnv(env('GOOGLE_PROJECT_ID'), env('GOOGLE_SECRET_ID'), 'YOUR_ENV_KEY');

```

#### Injecting Secrets into Laravel Configuration

[](#injecting-secrets-into-laravel-configuration)

You can inject secrets into Laravel configuration settings using the injectSecretToConfig method.

```
use Illuminate\Support\Facades\App;$secretManager = App::make('google.secret.manager');
// Inject the secret into Laravel configuration
$secretManager->injectSecretToConfig(env('GOOGLE_PROJECT_ID'), env('GOOGLE_SECRET_ID'), 'config.key');

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

660d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/03c5eb66358312b3e44a8dcd9ffbb9f8083fc86c0d86752490d21691b10a986d?d=identicon)[wahyucold](/maintainers/wahyucold)

---

Top Contributors

[![wahyuyn](https://avatars.githubusercontent.com/u/111958084?v=4)](https://github.com/wahyuyn "wahyuyn (1 commits)")

### Embed Badge

![Health badge](/badges/wyn-laravel-google-secret-manager/health.svg)

```
[![Health](https://phpackages.com/badges/wyn-laravel-google-secret-manager/health.svg)](https://phpackages.com/packages/wyn-laravel-google-secret-manager)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
