FEATURE: allow enabling of static pages via database

This commit is contained in:
Michal Kváček
2016-03-14 10:10:00 +01:00
parent eed7e15650
commit 892a597912
4 changed files with 39 additions and 47 deletions
@@ -1,6 +1,5 @@
<?php namespace Modules\Staticpages\Providers;
use App\Enumerations\Modules;
use App\Enumerations\ModulesHandlerToId;
use App\Enumerations\ModulesWithIds;
use App\Handlers\Registrators\TemplateRegistrator;
@@ -25,10 +24,11 @@ class StaticPagesServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->install();
$this->registerTranslations();
$this->registerConfig();
$this->registerViews();
$this->install();
}
/**
@@ -55,36 +55,37 @@ class StaticPagesServiceProvider extends ServiceProvider
Module::create([
'handler' => $handler,
'name' => 'staticpages::module.name',
'description' => 'staticpages::module.description'
'description' => 'staticpages::module.description',
'alias' => 'staticpages'
]);
// insert action log types into database
ActionLogType::create([
'string_id' => 'staticpages::createNew',
'name' => 'staticpages::log.nameCreateNew',
'value' => 'staticpages::log.nameCreateNew'
]);
ActionLogType::create([
'string_id' => 'staticpages::edit',
'name' => 'staticpages::log.nameEdit',
'value' => 'staticpages::log.edit'
]);
ActionLogType::create([
'string_id' => 'staticpages::delete',
'name' => 'staticpages::log.nameDelete',
'value' => 'staticpages::log.delete'
]);
ActionLogType::create([
'string_id' => 'staticpages::makeDraft',
'name' => 'staticpages::log.nameMakeDraft',
'value' => 'staticpages::log.makeDraft'
]);
ActionLogType::create([
'string_id' => 'staticpages::publish',
'name' => 'staticpages::log.namePublish',
'value' => 'staticpages::log.publish'
]);
// ActionLogType::create([
// 'string_id' => 'staticpages::createNew',
// 'name' => 'staticpages::log.nameCreateNew',
// 'value' => 'staticpages::log.nameCreateNew'
// ]);
// ActionLogType::create([
// 'string_id' => 'staticpages::edit',
// 'name' => 'staticpages::log.nameEdit',
// 'value' => 'staticpages::log.edit'
// ]);
// ActionLogType::create([
// 'string_id' => 'staticpages::delete',
// 'name' => 'staticpages::log.nameDelete',
// 'value' => 'staticpages::log.delete'
// ]);
// ActionLogType::create([
// 'string_id' => 'staticpages::makeDraft',
// 'name' => 'staticpages::log.nameMakeDraft',
// 'value' => 'staticpages::log.makeDraft'
// ]);
//
// ActionLogType::create([
// 'string_id' => 'staticpages::publish',
// 'name' => 'staticpages::log.namePublish',
// 'value' => 'staticpages::log.publish'
// ]);
}
}