File manager - Edit - /home/webapp69.cm.in.th/u69319090028/Shop/app/Models/Role.php
Back
<?php /** * Role Model * Maps to `roles` and `admin_permissions` tables */ require_once __DIR__ . '/../Core/Model.php'; class Role extends Model { protected string $table = 'roles'; public function getPermissionsByRoleId(int $roleId): array { $sql = "SELECT module, action FROM `admin_permissions` WHERE role_id = :role_id"; return $this->fetchAll($sql, [':role_id' => $roleId]); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings