Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration of package isn not loaded in migration #38

Closed
ghost opened this issue Jan 14, 2013 · 4 comments
Closed

Configuration of package isn not loaded in migration #38

ghost opened this issue Jan 14, 2013 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 14, 2013

The code

Config::get('dbconfig::dbconfig.table')

return content of config in app but in migration it is 'null'

@jasonlewis
Copy link
Contributor

This is because a packages config is registered in the boot() method of a service provider. The application is never "booted" as such when run via Artisan.

Perhaps @taylorotwell can boot registered service providers when running in the console.

For now @sajjad-ser you can manually register your packages config in the register() method of your service provider.

$this->app['config']->package('<vendor>/<package>', __DIR__.'/../../config');

First parameter should be your packages vendor/package and the second should be the path to the packages config directory.

@ghost
Copy link
Author

ghost commented Jan 15, 2013

Tank you @jasonlewis

@taylorotwell
Copy link
Member

Yeah all packages probably need to be booted in Artisan. Will look into this.

@taylorotwell
Copy link
Member

Fixed.

taylorotwell added a commit that referenced this issue Mar 15, 2014
[Proposal] Add $secure parameter to script, style and image methods (#38...
gonzalom pushed a commit to Hydrane/tmp-laravel-framework that referenced this issue Oct 12, 2023
Configuration of sqlite database file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants