PHPackages                             nathanburkett/ecosystem - 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. nathanburkett/ecosystem

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

nathanburkett/ecosystem
=======================

Asset aware environments

v0.0.2(10y ago)114[1 issues](https://github.com/NathanBurkett/Ecosystem/issues)MITPHPPHP &gt;=5.5.9

Since Feb 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/NathanBurkett/Ecosystem)[ Packagist](https://packagist.org/packages/nathanburkett/ecosystem)[ RSS](/packages/nathanburkett-ecosystem/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

NathanBurkett/Ecosystem
=======================

[](#nathanburkettecosystem)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e4def518110a3247ebd3639cf5020d4b438307f7c6e3c250f3d98c8a1cb3bfe3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e617468616e6275726b6574742f65636f73797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nathanburkett/ecosystem)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Ecosystem is a simple and smart environment manager for your user-facing scripts and stylesheets.

Ecosystems are useful when you have collections of separate resources for differing sections of your application -  vs. . Creating an Ecosystem for each section allows to you manage each's resources in a collection one place while being able to add new resources to the collection on the fly.

Install
-------

[](#install)

To install Ecosystem as a Composer package, run:

```
composer require nathanburkett/ecosystem
```

Once it's installed, you can register the service provider in `config/app.php` in the `providers` array:

```
'providers' => [

    ...

	NathanBurkett\Ecosystem\Providers\EcosystemServiceProvider::class,
]
```

And register the `Ecosystem` facade in the the `aliases` array:

```
'aliases' => [

    ...

    'Ecosystem' => NathanBurkett\Ecosystem\Facades\Ecosystem::class,
```

Then publish Ecosystems's assets with `php artisan vendor:publish`. This will add the file `config/ecosystem.php`. This [config file](src/config/ecosystem.php) allows certain envionments to disable cache-busting strings.

Usage
-----

[](#usage)

### Creating a New Ecosystem

[](#creating-a-new-ecosystem)

Run `php artisan` from the console, and you'll see the new `make:ecosystem` command.

Running `php artisan make:ecosystem StandardEcosystem` from the console will create `StandardEcosystem` in `App\Library\Ecosystems` directory. If directory doesn't exist, the command will create it.

To place Ecosystem in a different directory, append `--namespace=Your\Namespace\Here` to the command. Doing so will create an Ecosystem in the string of directories starting with a lowercase version of the first directory segment - ie `--namespace=Resources\Ecosystems` would place the Ecosystem in `resources\Ecosystems`.

The command `php artisan make:ecosystem StandardEcosystem` would generate the following file in the `App\Library\Ecosystems` directory.

```
