/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create($name, $id, $seo) { $cat_table = Category::find($id); if ($cat_table->name_seo !== $seo) { Alert::error('Something went wrong, cant find' . $seo, 'Oops!')->persistent("Close"); return view('dropmin/dashboard/index'); } $url_get = $name; $seos = SeoHelper::seoclean($seo); $data = array('id' => $id, 'name' => $name, 'url_get' => $url_get, 'seo' => $seos); return view('dropmin/image/add')->with('data', $data); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create($get, $seo, $id) { if ($get == "category") { $slctdb = Category::find($id); } elseif ($get == "sub_category") { $slctdb = CategorySub::find($id); } elseif ($get == "product") { $slctdb = Product::find($id); } elseif ($get == "productvariant") { $slctdb = ProductVariant::find($id); } else { Alert::Error($get . ', Not Found!')->persistent("Close"); return view('dropmin/dashboard/index'); } if ($slctdb->name_seo !== $seo) { Alert::Error($get . ', Not Found!')->persistent("Close"); return view('dropmin/dashboard/index')->with('message', $get . 'Not Found!'); } $url_get = $get; $seos = SeoHelper::seoclean($seo); $data = array('id' => $id, 'name' => $get, 'get' => $get, 'seo' => $seos); return view('dropmin/image/add')->with('data', $data); }