/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { //dd($id); Menu::find($id)->delete(); Flash::success(trans('kotoba::cms.success.menu_delete')); return redirect('admin/menus'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $this->menulink->find($id)->delete(); Flash::success(trans('kotoba::cms.success.menulink_delete')); return redirect('admin/menus'); }
/** * Update a role. * * @param array $inputs * @param int $id * @return void */ public function update($input, $id) { //dd($input); $menu = Menu::find($id); $values = ['name' => $input['name'], 'class' => $input['class']]; $menu->update($values); $locales = $this->getLocales(); foreach ($locales as $locale => $properties) { App::setLocale($properties['locale']); $values = ['status' => $input['status_' . $properties['id']], 'title' => $input['title_' . $properties['id']]]; $menu->update($values); } App::setLocale('en'); return; }