FEATURE: change directory structure
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace App\CMS\Enumerations;
|
||||
|
||||
use App\Models\CustomFieldResource;
|
||||
|
||||
class CustomFieldResources extends BaseEnumeration
|
||||
{
|
||||
public static $items = [];
|
||||
|
||||
public static function init()
|
||||
{
|
||||
// load items from database
|
||||
$types = CustomFieldResource::all(['id', 'name']);
|
||||
|
||||
// push items into collection
|
||||
foreach ($types as $type) {
|
||||
self::push($type->id, $type->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user