add projet

This commit is contained in:
root
2026-03-05 12:29:37 -05:00
parent 8d1eef8ba8
commit 23b7db1107
9109 changed files with 1106501 additions and 73 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Models;
use App\Models\BaseModel;
class NavItem extends BaseModel
{
protected $table = 'nav_items';
protected $primaryKey = 'id';
public $timestamps = true;
protected $useSoftDeletes = true;
protected $fillable = [
'menu_parent_id',
'label',
'url',
'icon_class',
'target',
'sort_order',
'is_enabled',
'created_at',
'updated_at',
'deleted_at',
];
public function getChildrenOf(int $parentId): array
{
return $this->where('parent_id', $parentId)
->where('is_enabled', 1)
->orderBy('sort_order', 'ASC')
->findAll();
}
}