public function excluir($id, $fk = null) { $model = new Menu(); $model->getParentAndDelete($id); return redirect()->route('admin.menu.index'); }
public function Menu() { $menu = Menu::all()->sortBy('prioridade')->where('parent_id', $this->parentId)->where('middleware_id', $this->middleware)->where('formato', $this->formato); return $menu; }