FEATURE: allow enabling of static pages via database
This commit is contained in:
@@ -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'
|
||||
// ]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user