# Owl-Admin-Starter - PHP >= 8.2 - laravel/framework: ^11.x - slowlyo/owl-admin: ^3.8 ## Helpers ### 上传文件 修改文件上传接口 `admin-api/upload_file`, `admin-api/upload_image`, 返回完整链接 - `app\Admin\Controllers\HomeController.php@upload` ### SQL 日志 监听sql执行, 打印日志 - `app/Providers/QueryLogServiceProvider.php` - `bootstrap/providers.php` ### 无限级分类 - `app/Traits/TreePath.php` | column | name | comment | | - | - | - | | parent_id | 上级id | 默认: 0 | | path | 所有上级id | 默认: -, 例如: -1-2-3- | | sort | 排序 | 正序 | ### 修改扩展 slowlyo/owl-admin 鉴权 `permission` 方法 - `vendor\slowlyo\owl-admin\src\Renderers\BaseRenderer.php` ```php public function filteredResults() { $permissionKey = 'owl_permission'; // if (key_exists($permissionKey, $this->amisSchema)) { // if (!admin_user()->can($this->amisSchema[$permissionKey])) { // return data_get($this->amisSchema, 'owl_permission_replace_value', ''); // } // } if (key_exists($permissionKey, $this->amisSchema)) { $this->amisSchema['visible'] = admin_user()->can($this->amisSchema[$permissionKey]); } return \Slowlyo\OwlAdmin\Support\Cores\AdminPipeline::handle(static::class, $this->amisSchema); } ```