In Laravel 4, we have a file called app/config/app.php
, which we use to define configuration information that will be used in the application.
When I am in a development environment, I configure the application to process app/config/local/app.php
to be able to have information that will be used only in the development environment.
But I have a problem: When I try to add a value in providers
to be process only in local environment, I'm getting errors when running Artisan
or memso the application.
I imagine this is happening because when we store a configuration file, the indexes of app/config/app.php
are replaced by what we use in app/config/local/app.php
, and this is probably causing some item of index providers
to be removed .
Example app/config/app.php
:
'providers' => array(
'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Auth\Reminders\ReminderServiceProvider',
'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Database\MigrationServiceProvider',
'Illuminate\Database\SeedServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider',
'Illuminate\Filesystem\FilesystemServiceProvider',
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Hashing\HashServiceProvider',
'Illuminate\Html\HtmlServiceProvider',
'Illuminate\Log\LogServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Queue\QueueServiceProvider',
'Illuminate\Redis\RedisServiceProvider',
'Illuminate\Remote\RemoteServiceProvider',
'Illuminate\Routing\ControllerServiceProvider',
'Illuminate\Session\CommandsServiceProvider',
'Illuminate\Session\SessionServiceProvider',
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Illuminate\Workbench\WorkbenchServiceProvider',
Example app/config/local/app.php
:
'providers' => array(
'Way\Generators\GeneratorsServiceProvider',
'Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider',
)
How can I solve this problem?