fix: return type

This commit is contained in:
JaguarJack 2023-03-15 14:54:52 +08:00
parent 345fa31a71
commit 3123eb53cb

View File

@ -39,10 +39,10 @@ class PermissionsController extends Controller
/** /**
* *
* @param Request $request * @param Request $request
* @return bool * @return mixed
* @throws \ReflectionException * @throws \ReflectionException
*/ */
public function store(Request $request): bool public function store(Request $request)
{ {
return $this->model->storeBy($request->all()); return $this->model->storeBy($request->all());
} }
@ -71,9 +71,9 @@ class PermissionsController extends Controller
/** /**
* *
* @param $id * @param $id
* @return bool|null * @return mixed
*/ */
public function destroy($id): ?bool public function destroy($id)
{ {
if ($this->model->where($this->model->getParentIdColumn(), $id)->first()) { if ($this->model->where($this->model->getParentIdColumn(), $id)->first()) {
throw new FailedException('无法进行删除,请先删除子级'); throw new FailedException('无法进行删除,请先删除子级');