FEATURE: add seed and enumeration for action log types
This commit is contained in:
@@ -14,5 +14,6 @@ class DatabaseSeeder extends Seeder
|
||||
// fill up custom field types
|
||||
$this->call(SeedCustomFieldTypes::class);
|
||||
$this->call(SeedCustomFieldResources::class);
|
||||
$this->call(SeedActionLogTypes::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class SeedActionLogTypes extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$types = [
|
||||
'login',
|
||||
'logout',
|
||||
'selfUserEdit',
|
||||
'userEdit',
|
||||
'changePassword',
|
||||
'newCustomField',
|
||||
'editCustomField',
|
||||
'deleteCustomField',
|
||||
'changeSettings'
|
||||
];
|
||||
|
||||
foreach ($types as $type) {
|
||||
\DB::table('action_log_types')
|
||||
->insert([
|
||||
'name' => 'admin/actionLog.name' . ucfirst($type),
|
||||
'value' => 'admin/actionLog.' . $type
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user