repository = $repository; } public function create(MenuForm $form): Menu { $menu = Menu::create( $form->name ); $this->repository->save($menu); return $menu; } public function edit($id, MenuForm $form): void { $menu = $this->repository->get($id); $menu->edit( $form->name ); $this->repository->save($menu); } public function remove($id): void { $menu = $this->repository->get($id); $this->repository->remove($menu); } }