25 lines
520 B
PHP
25 lines
520 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: michal
|
|
* Date: 18.2.16
|
|
* Time: 10:33
|
|
*/
|
|
|
|
namespace App\CMS\Enumerations;
|
|
|
|
use App\Models\Templates\TemplatePath;
|
|
|
|
class TemplatePathsHumanReadableRootOnly extends BaseEnumeration
|
|
{
|
|
protected static function init()
|
|
{
|
|
$paths = TemplatePath::where('parent_id', null)
|
|
->select(['id', 'name'])
|
|
->get();
|
|
|
|
foreach ($paths as $path) {
|
|
self::push($path->id, $path->name);
|
|
}
|
|
}
|
|
} |