1234567891011121314151617181920212223242526272829303132 |
- <?php
- /**
- * @Name
- * @Description
- * @Author 刘学玺
- * @Date 2023/11/23 20:57
- */
- namespace App\Http\Services\Admin\System;
- use App\Http\Services\BaseService;
- use App\Models\Admin;
- use App\Models\Menu;
- use App\Models\RoleAuth;
- use App\Models\User;
- class RoleAuthService extends BaseService
- {
- public function store(array $data)
- {
- $roleAuthData = RoleAuth::where('role_id', $data['role_id'])->first();
- $roleAuthData && $roleAuthData->delete();
- return $this->commonCreate(RoleAuth::query(), $data);
- }
- public function detail($id)
- {
- $data = RoleAuth::where('role_id', $id)->first()?->toArray() ?? [];
- return $this->apiSuccess('',$data);
- }
- }
|