0
On Laravel 4, we have a file called app/config/app.php
, that we use to be able to define configuration information that will be used in the application.
When I am in development environment, I configure the application to process the app/config/local/app.php
in order to have information that will be used only in a 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 running the 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 probably this is causing some item of the index providers
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?