Download the PHP package percymamedy/laravel-dev-booter without Composer
On this page you can find all versions of the php package percymamedy/laravel-dev-booter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download percymamedy/laravel-dev-booter
More information about percymamedy/laravel-dev-booter
Files in percymamedy/laravel-dev-booter
Package laravel-dev-booter
Short Description Boost your Laravel app by registering Prod services only on Prod.
License MIT
Informations about the package laravel-dev-booter
Laravel dev booter
Introduction
During development of a Laravel App; some Service Providers are very helpful. These services helps us with debugging and coding. But registering these providers on production is usually not a good idea. They can slow down our App or even expose sensitive information.
Laravel Dev Booter helps end this problem. The package consists of a single . This provider will exclude unwanted providers from your production environment.
License
Laravel Dev Booter is open-sourced software licensed under the MIT license
Version Compatibility
Laravel | DevBooter |
---|---|
5.x | 0.2.x |
6.x | 1.0.x |
7.x | 2.0.x |
8.x | 3.0.x |
9.x | 3.0.x |
10.x | 4.0.x |
11.x | 5.0.x |
Installation
Install Laravel Dev Booter as you would with any other dependency managed by Composer:
Configuration
If you are using Laravel >= 5.5, you can skip service registration and aliases registration thanks to Laravel auto package discovery feature.
After installing Laravel Dev Booter all you need is to register the
in your config/app.php
configuration file:
Usage
First use the command to copy the configuration file to your application:
This will create the file .
Defining your development environments
In the file you will find the section. Use this section to define your app's development environments:
These are the only environments where Dev Booter will act; and try to register any Service providers.
Development Service providers locations
The next section in the file is the . The array contains an entry for each of your development environments specified above. Feel free to add and edit this section.
The value for each of these entries can be an array or a string. The values represents the locations of a Service Provider array for each enviroment. You can even specify many locations for an environment, Dev Booter will take care of loading providers in each of these locations.
You may now define these Service Providers array in the file as you would for any regular Service Provider:
Development Aliases locations
The last section of the file is the . As with Service Providers, it works on the same principle.
You first specify the location of your aliases per environment:
Then define these aliases array in the file:
Going Further
In the above examples, providers and aliases array were define in , but this does not have to be the case. You can define these array in any config files provided by Laravel or even create your own. Simply make sure you adjust your and .
For example:
Then in
Credits
Big Thanks to all developers who worked hard to create something amazing!
Creator
Twitter: @PercyMamedy
GitHub: percymamedy