FEATURE #1374: add logging for static pages
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php namespace Modules\Staticpages\Providers;
|
||||
|
||||
use App\Enumerations\Modules;
|
||||
use App\Models\ActionLogType;
|
||||
use App\Models\Module;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@@ -40,7 +41,8 @@ class StaticPagesServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
// register event provider for firing module-specific events
|
||||
$this->app->register('Modules\StaticPages\Providers\EventServiceProvider');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,6 +60,34 @@ class StaticPagesServiceProvider extends ServiceProvider
|
||||
'name' => 'staticpages::module.name',
|
||||
'description' => 'staticpages::module.description'
|
||||
]);
|
||||
|
||||
// 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'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user