Add config.php at root; include configuration overhaul and then fixes to the installer #156
This commit is contained in:
@@ -2,12 +2,10 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use App\Repositories\SettingRepository;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
use App\Models\Flight;
|
||||
use App\Models\Pirep;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -18,29 +16,18 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
Schema::defaultStringLength(191);
|
||||
|
||||
Relation::morphMap([
|
||||
'flights' => Flight::class,
|
||||
'pireps' => Pirep::class,
|
||||
]);
|
||||
|
||||
$this->app->bind('setting', SettingRepository::class);
|
||||
|
||||
//\VaCentral\VaCentral::setVaCentralUrl(config('phpvms.vacentral_api_url'));
|
||||
if(!empty(config('phpvms.vacentral_api_key'))) {
|
||||
\VaCentral\VaCentral::setApiKey(config('phpvms.vacentral_api_key'));
|
||||
}
|
||||
|
||||
# if there's a local.conf.php in the root, then merge that in
|
||||
if(file_exists(base_path('config.php'))) {
|
||||
/*if(file_exists(base_path('config.php'))) {
|
||||
$local_conf = include base_path('config.php');
|
||||
|
||||
foreach($local_conf as $namespace => $override_config) {
|
||||
$config = $this->app['config']->get($namespace, []);
|
||||
$this->app['config']->set(
|
||||
$namespace,
|
||||
array_merge($config, $override_config)
|
||||
);
|
||||
$update_config = array_merge_recursive($config, $override_config);
|
||||
$this->app['config']->set($namespace, $update_config);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user