$post['menuname'], 'nameSeo' => seo($post['menuname']), ]); redirect('menu'); } function menusave($post){ $link =''; if (!empty($post['link'])) { $link = $post['link']; }else{ $link = $post['link1']; } DB::insert('menu',[ 'menuCatId' => $post['menuCatId'], 'title' => $post['title'], 'nameSeo' => seo($post['title']), 'link' => $link, 'lang' => $post['lang'], 'icon' => $post['icon'], 'language' => '' ]); if (!DB::error()) { redirect('menu'); } } function edit($post){ $link =''; if (!empty($post['link'])) { $link = $post['link']; }else{ $link = $post['link1']; } DB::where('id',$post['id'])->update('menu',[ 'menuCatId' => $post['menuCatId'], 'title' => $post['title'], 'nameSeo' => seo($post['title']), 'link' => $link, 'lang' => $post['lang'], 'icon' => $post['icon'], ]); if (!DB::error()) { redirect('menu'); } } function copy($post){ $link =''; if (!empty($post['link'])) { $link = $post['link']; }else{ $link = $post['link1']; } DB::insert('menu',[ 'menuCatId' => $post['menuCatId'], 'title' => $post['title'], 'nameSeo' => seo($post['title']), 'link' => $link, 'lang' => $post['lang'], 'icon' => $post['icon'], 'language' => '' ]); if (!DB::error()) { redirect('menu'); } } }