Skip to content

Commit

Permalink
Merge pull request #5 from ARCANESOFT/develop
Browse files Browse the repository at this point in the history
Updating Foundation package
  • Loading branch information
arcanedev-maroc authored Jul 23, 2016
2 parents f0acf9b + c996e63 commit 9c5b495
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
12 changes: 11 additions & 1 deletion config/foundation.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,21 @@
],
],

/* ------------------------------------------------------------------------------------------------
| Modules
| ------------------------------------------------------------------------------------------------
*/
'modules' => [
'setup' => [
//
],
],

/* ------------------------------------------------------------------------------------------------
| LogViewer
| ------------------------------------------------------------------------------------------------
*/
'log-viewer' => [
'per-page' => 30,
]
],
];
20 changes: 16 additions & 4 deletions src/Console/SetupCommand.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php namespace Arcanesoft\Foundation\Console;

use Arcanedev\Support\Bases\Command;
use Arcanesoft\Foundation\Seeds\DatabaseSeeder;

/**
* Class SetupCommand
Expand Down Expand Up @@ -112,12 +113,23 @@ private function seedAllModules()
$this->line('');

$this->call('auth:setup');

$this->call('db:seed', [
'--class' => \Arcanesoft\Foundation\Seeds\DatabaseSeeder::class
]);
$this->call('db:seed', ['--class' => DatabaseSeeder::class]);

$this->comment('Database seeded !');
$this->line('');

foreach ($this->config()->get('arcanesoft.foundation.modules.setup', []) as $setup) {
$this->call($setup);
}
}

/**
* Get the config repository.
*
* @return \Illuminate\Contracts\Config\Repository
*/
protected function config()
{
return $this->laravel['config'];
}
}
16 changes: 10 additions & 6 deletions src/Providers/PackagesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,26 @@ private function registerLogViewerPackage()
*/
private function configSeoHelperPackage()
{
$config = $this->config();

// Setting up the SEO Helper config.
$this->config()->set(
$config->set(
'seo-helper.title.site-name',
$this->config()->get('arcanesoft.foundation.seo.site-name', 'ARCANESOFT')
$config->get('arcanesoft.foundation.seo.site-name', 'ARCANESOFT')
);
$this->config()->set(
$config->set(
'seo-helper.misc.default.viewport',
$this->config()->get('arcanesoft.foundation.seo.viewport')
$config->get('arcanesoft.foundation.seo.viewport')
);
}

private function configLogViewerPackage()
{
$config = $this->config();

// Setting up the LogViewer config.
$this->config()->set('log-viewer.route.enabled', false);
$this->config()->set(
$config ->set('log-viewer.route.enabled', false);
$config ->set(
'log-viewer.menu.filter-route',
'foundation::log-viewer.logs.filter'
);
Expand Down

0 comments on commit 9c5b495

Please sign in to comment.