getRawOriginal('role') === 'admin') { return true; } $role = $this->roleModel; if (!$role) return false; $column = str_starts_with($action, 'can_') ? $action : 'can_' . $action; return $role->permissions() ->where('module_slug', $moduleSlug) ->where($column, 1) ->exists(); } }