FEATURE: add seed and enumeration for action log types
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace App\Enumerations;
|
||||
|
||||
use App\Models\ActionLogType;
|
||||
|
||||
class ActionLogTypes extends BaseEnumeration
|
||||
{
|
||||
/**
|
||||
* Init list of all action log types
|
||||
*
|
||||
* @throws Exceptions\EnumerationExistsException
|
||||
*/
|
||||
protected static function init()
|
||||
{
|
||||
$types = ActionLogType::all(['id', 'name']);
|
||||
|
||||
foreach ($types as $type) {
|
||||
self::push($type->id, $type->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user