Package Data | |
---|---|
Maintainer Username: | Ron Appleton |
Maintainer Contact: | ron@appleton.digital (Ron Appleton) |
Package Create Date: | 2021-02-18 |
Package Last Update: | 2023-09-29 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-18 03:00:52 |
Package Statistics | |
---|---|
Total Downloads: | 325 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 3 |
Total Forks: | 3 |
Total Open Issues: | 3 |
Add package discovery to your lumen application.
Require via composer:
composer require larapkg/lumen-discover
Open your base composer.json
file in your project root and add the following to the end of the file:
"scripts": {
"post-autoload-dump": [
"LaraPkg\LumenDiscover\Events\Dump::post"
]
}
The above will enable the packages' ability to discover and cache your providers and aliases.
Now simply register the packages service provider in your bootstrap/app.php
file:
$app->register(\LaraPkg\LumenDiscover\ServiceProvider::class);
With the above complete you can now build packages to your hearts content and not worry about how they register into your lumen app.
To make a package you write compatible with this package, you will need to add the following to your packages composer json:
Example from barryvdh/laravel-debugbar
"extra": {
"laravel": {
"providers": [
"Barryvdh\\Debugbar\\ServiceProvider"
],
"aliases": {
"Debugbar": "Barryvdh\\Debugbar\\Facade"
}
}
},
With this package you can use laravel
or lumen
interchangeably but remember if you want to use your packages with Laravel
you should stick with the laravel
naming convention.
That's it, now you can pull laravel packages into your lumen app and watch them self register, or you can build you own packages that will also self-register. Have fun!
The base repository this work is off of is composer/composer and it is well worth a read.