hirokws / prodev
Add extra Laravel service providers and class alias with `local` environment.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Requires
- php: >=5.5.9
- laravel/framework: >=5.1.0
This package is not auto-updated.
Last update: 2024-01-20 15:39:25 UTC
README
Add extra Laravel service providers and class aliases at 'local' environment. This Component name came from 'prod(uctin)-dev(elopment)'.
CAUTION, this is bata version now.
Installation
On your terminal, type following command.
composer require hirokws/prodev
Or, register in composer.json file.
...
require {
...
"hirokws/prodev": "0.1.*"
}
...
Usage
First of all, add a service provider of this package into 'providers' array in app.php configuratin file.
'providers' => [
....
'HiroKws\Prodev\ProdevServiceProvider',
],
Then next, register your addtional providers when use at local environment in app.php file. Like following :
...
'dev-providers' => [
Barryvdh\Debugbar\ServiceProvider::class,
],
...
If needed, register additnal class aliases. For example :
...
'dev-aliases' => [
'Debugbar' => Barryvdh\Debugbar\Facade::class,
]
At 'local' environment, aliases defined in 'dev-aliases' array, are effective. In other environments, defined aliases will asign to dummy stab class to do nothing when any method called.
So following code will log a 'test' string onto Debugbar when local environment, otherwise do nothing.
\Debugbar::info('test');
This is simple package. See also check codes. ;D Keep it simple simple things. :D