Closed huszerldani closed 2 years ago
Hi!
I really like your package, but I need to disable it in production environment, so I made an env variable called ADMINER_ENABLED
with default false.
Hi @huszerldani
This package does not automatically register its provider. One thing thing you can do in the meantime is conditionally register it. I'm using the following in a few projects:
/**
* Register any application services.
*
* @return void
*/
public function register()
{
// register adminer but only in local environment
if($this->app->environment(['local', 'dev'])) {
$this->app->register(\Onecentlin\Adminer\ServiceProvider::class);
}
}
Hi @huszerldani
This package does not automatically register its provider. One thing thing you can do in the meantime is conditionally register it. I'm using the following in a few projects:
/**
* Register any application services.
*
* @return void
*/
public function register()
{
// register adminer but only in local environment if($this->app->environment(['local', 'dev'])) {
$this->app->register(\Onecentlin\Adminer\ServiceProvider::class);
}
}
Sorry about the formatting. Posting from my phone atm
Thank you! 🙏
Added an env variable for enabling/disabling adminer. It is useful for a production environment.