Browse Source

修复宝箱配置仓库类继承错误

- 修复ItemChestConfigRepository继承UCore\DcatAdmin\Repository不存在的问题
- 改为继承Dcat\Admin\Repositories\EloquentRepository
- 统一Repository类的继承方式,与其他Repository类保持一致
- 修复后台宝箱配置管理页面无法访问的问题
notfff 7 months ago
parent
commit
5ac5437004
1 changed files with 3 additions and 11 deletions
  1. 3 11
      app/Module/GameItems/Repositories/ItemChestConfigRepository.php

+ 3 - 11
app/Module/GameItems/Repositories/ItemChestConfigRepository.php

@@ -3,24 +3,16 @@
 namespace App\Module\GameItems\Repositories;
 
 use App\Module\GameItems\Models\ItemChestConfig;
-use UCore\DcatAdmin\Repository;
+use Dcat\Admin\Repositories\EloquentRepository;
 
 /**
  * 宝箱配置仓库类
  *
  * 提供宝箱配置的数据访问方法,专门用于后台管理
  */
-class ItemChestConfigRepository extends Repository
+class ItemChestConfigRepository extends EloquentRepository
 {
-    /**
-     * 获取模型类名
-     *
-     * @return string
-     */
-    public function getModel(): string
-    {
-        return ItemChestConfig::class;
-    }
+    protected $eloquentClass = ItemChestConfig::class;
 
     /**
      * 获取激活的宝箱配置