// +---------------------------------------------------------------------- namespace App\Http\Controllers\Auth; use App\Http\Controllers\Base; use App\Services\Auth\AuthService; class Permission extends Base{ /** * @title 菜单列表 * * @param AuthService $service * @return void */ public function index(AuthService $service){ $this->data['code'] = 1; $this->data['data'] = $service->getAuthMenu(); return $this->data; } /** * @title 我的菜单及权限 * * @param AuthService $service * @return void */ public function my(AuthService $service){ $this->data['code'] = 1; $this->data['data'] = ['menu' => $service->getAuthMenu(), 'permissions' => $service->getAuthPermissions()]; return $this->data; } /** * @title 添加菜单 * * @param AuthService $service * @return void */ public function add(AuthService $service){ $this->data['code'] = 1; $this->data['data'] = $service->getAuthMenu(); return $this->data; } /** * @title 更新菜单 * * @param AuthService $service * @return void */ public function edit(AuthService $service){ $this->data['code'] = 1; $this->data['data'] = $service->getAuthMenu(); return $this->data; } }