PHPackages                             manifoldco/manifold-laravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. manifoldco/manifold-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

manifoldco/manifold-laravel
===========================

A package to pull configurations from your Manifold account

v1.1.0(7y ago)221311[1 issues](https://github.com/manifoldco/manifold-laravel/issues)BSD-3-ClausePHPPHP ~7.0

Since Dec 5Pushed 7y ago21 watchersCompare

[ Source](https://github.com/manifoldco/manifold-laravel)[ Packagist](https://packagist.org/packages/manifoldco/manifold-laravel)[ Docs](https://github.com/manifoldco/manifold-laravel)[ RSS](/packages/manifoldco-manifold-laravel/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (3)Versions (8)Used By (0)

manifold-laravel
================

[](#manifold-laravel)

Official Laravel package connecting your [Manifold](https://manifold.co) secrets into your Laravel application.

[Code of Conduct](./CODE_OF_CONDUCT.md) | [Contribution Guidelines](./.github/CONTRIBUTING.md)

[![GitHub release](https://camo.githubusercontent.com/d962e569219626f3cda49155c6b4ac15131dc56ead27aa4d601ddeba9eb4e87c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6d616e69666f6c64636f2f6d616e69666f6c642d6c61726176656c2e7376673f6c6162656c3d6c6174657374)](https://github.com/manifoldco/manifold-laravel/releases)[![Travis](https://camo.githubusercontent.com/23480345e30a3216ad4ca523fa07787984dc8f2638f46d6eaab04f12b1551a2f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d616e69666f6c64636f2f6d616e69666f6c642d6c61726176656c2f6d61737465722e737667)](https://travis-ci.org/manifoldco/manifold-laravel)[![License](https://camo.githubusercontent.com/2b599ab1ace97388d4375b87919f92781a1a61d016fe640a5c4d15fc365deed1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d626c75652e737667)](./LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/faee0a480c2ad9c58f73d151b3ad92e1900892572a0c1d8033ab4ada86936942/68747470733a2f2f706f7365722e707567782e6f72672f6d616e69666f6c64636f2f6d616e69666f6c642d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/manifoldco/manifold-laravel)

Introduction
------------

[](#introduction)

The Manifold Laravel package allows you to connect to your Manifold account and pull your credentials, keys, configurations, etc. from your Manifold account into your Laravel application.

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

[](#installation)

1. Install the package

```
composer require manifoldco/manifold-laravel

```

2. Publish the config file and select `manifoldco\manifold-laravel` from the vendor list.

```
php artisan vendor:publish

```

3. Add, at the very least, your Manifold Bearer token to your `.env` file as follows: `MANIFOLD_API_TOKEN=YOUR-TOKEN-HERE`
4. You may optionally specify a Project by providing the label in your `.env` file.

```
MANIFOLD_PROJECT=YOUR-PROJECT-LABEL

```

Usage
-----

[](#usage)

Once installed and configured, your project/resource credentials from Manifold will be pulled into your Laravel application as configurations. Your credentials can be accessed using the `config` helper, using the label of the resource and the key of credential, as they exist in Manifold, using dot-notation. For example, if you have a Mailgun resource setup with a credential named `API_KEY`, it can be accessed using `config('mailgun.API_KEY')` (where `mailgun` is the resource's label).

Note that keys are case sensitive. Also note that when configurations conflict with other Laravel configs, the Manifold configurations will take priority.

Aliases
-------

[](#aliases)

In some cases, you may wish to use credentials from Manifold within configuration files (inside your `/config` directory). The most obvious use case would be database credentials that are needed within `/config/database.php`. Since you cannot reliably access configurations from within configuration files using the `config()` helper, aliases may be defined in your `config/manifold.php`file. Aliases can be defined in arrays (as with standard configurations) or using dot-notation for array keys. Define the existing config as the key and the Manifold credential as the value. For example, pulling a PostgreSQL password from a custom PostgreSQL service in Manifold could look like this: `'database.connections.pgsql.password' => 'custom-pgsql.DB_PASSWORD'`. This will pull the `DB_PASSWORD` credential from the `custom-pgsql` resource and assign its value to `database.connections.pgsql.password`, so there is no need to manipulate your existing `config/database.php` file.

Examples
--------

[](#examples)

1. You have a project in Manifold with a label of `my-project`. You want your Mailgun API key available in a controller method. Your Mailgun resource is named `mailgun` and the API key credential is `API_KEY`.

Add the following to `.env`

```
MANIFOLD_API_TOKEN=0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789AB
MANIFOLD_PROJECT=my-project

```

In your controller's php file:

```
class MyController extends Controller{
    public function process_mail(){

        $mailgun_key = config('mailgun.API_KEY');

        //mail processing logic here
    }
}

```

2. You have a project in Manifold with a label of `my-project`. You want your PostgreSQL credentials from your custom service stored in Manifold. Your custom service is named `custom-pgsql` and the PostgreSQL credential keys are `DB_HOST`, `DB_DATABASE`, `DB_USERNAME`, and `DB_PASSWORD`.

Add the following to `.env`

```
MANIFOLD_API_TOKEN=0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789AB
MANIFOLD_PROJECT=my-project

```

In your `config/manifold.php`:

```
return [
    'token' => env('MANIFOLD_API_TOKEN', null),
    'project' => env('MANIFOLD_PROJECT', null),
    'aliases' => [
        /*
            note that while you can mix and match array syntax and dot-notation
            it's best to use one or the other, this merely illustrates that both
            are possible
        */
        'database.connections.pgsql.password' => 'custom-pgsql.DB_PASSWORD',
        'database' => [
            'connections' => [
                'pgsql' => [
                    'host' => 'custom-pgsql.DB_HOST',
                    'database' => 'custom-pgsql.DB_DATABASE',
                    'username' => 'custom-pgsql.DB_USERNAME',
                ]
            ]
        ]
    ],
];

```

3. You have a project in Manifold with a label of `my-project`. You want your MySQL credentials from your JAWS stored in Manifold. Your JAWS service is named `jaws-mysql` and the connection credentials are in URL syntax as `JAWSDB_URL`. The URL syntax does not work with Laravel out of the box and must be parsed. For this you can pass a closure as the value of an alias. The closure receives no parameters, but all configs are loaded so you can access and Manifold stored credentials and manipulate them as necessary.

Add the following to `.env`

```
MANIFOLD_API_TOKEN=0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789AB
MANIFOLD_PROJECT=my-project

```

In your `config/manifold.php`:

```
return [
    'token' => env('MANIFOLD_API_TOKEN', null),
    'project' => env('MANIFOLD_PROJECT', null),
    'aliases' => [
        'database' => [
            'connections' => [
                'mysql' => [
                    'host' => function(){
                        $url = parse_url(config('custom-service.jaws'));
                        return $url['host'];
                    },
                    'password' => function(){
                        $url = parse_url(config('custom-service.jaws'));
                        return $url['pass'];
                    },
                    'username' => function(){
                        $url = parse_url(config('custom-service.jaws'));
                        return $url['user'];
                    },
                    'database' => function(){
                        $url = parse_url(config('custom-service.jaws'));
                        return substr($url["path"], 1);
                    }
                ]
            ]
        ]
    ],
];

```

Cautions
--------

[](#cautions)

1. Laravel's current process for loading config files it to load them alphabetically. This package relies on that feature to make sure configurations from your Manifold project are available within other configuration files. If you create a configuration file whose name comes alphabetically before the Manifold configuration files (`00-manifold.php` and `01-manifold.php`), you may experience unexpected results. If Laravel changes it's load order, what for updates to this package.
2. This package now uses the local file system to store API caches instead of Laravel's cache system, this is to allow the package to cache data from the API before the entire application is loaded (meaning before the Cache and Storage drivers are available). If you are in an environment where you cannot write to the local disk, you will not have caching features and every boot will require and API request. Similarly, if the user running the application does not have write permissions to `storage/.manifold.cache.key` you will not have caching features until this is remedied.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 57.7% 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 ~74 days

Recently: every ~93 days

Total

6

Last Release

2710d ago

Major Versions

v0.1.3 → v1.0.02018-08-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d70eb3b5b90caf199b8fe7c23a50eb42517031b412b26b08492ce23ba5acb21?d=identicon)[manifold](/maintainers/manifold)

---

Top Contributors

[![PLaRoche](https://avatars.githubusercontent.com/u/8809152?v=4)](https://github.com/PLaRoche "PLaRoche (15 commits)")[![webbtj](https://avatars.githubusercontent.com/u/865814?v=4)](https://github.com/webbtj "webbtj (8 commits)")[![jeffandersen](https://avatars.githubusercontent.com/u/474438?v=4)](https://github.com/jeffandersen "jeffandersen (2 commits)")[![garyposter](https://avatars.githubusercontent.com/u/44391?v=4)](https://github.com/garyposter "garyposter (1 commits)")

---

Tags

manifoldcomanifold

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/manifoldco-manifold-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/manifoldco-manifold-laravel/health.svg)](https://phpackages.com/packages/manifoldco-manifold-laravel)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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