/** * @param $todoListId * @return mixed */ public function todoCollection($todoListId) { $todoList = $this->todolistRepository->byId($todoListId); $todoListCollection = $this->todolistRepository->todoCollection($todoListId); if (Gate::denies('add-todo', $todoList)) { abort(403); } return $todoListCollection; }