Answers for "Dynamically dependent drop-down lists without ajax"

0

Dynamically dependent drop-down lists without ajax

public function index(Request $request)
    {

        $productdetail=productdetail::all();

        $data=new productdetail();
        $data=new productdetail();
        $data->ProductID=$request->productid;
        $category=category::where(DB::table('categories')
            ->join('productdetails','categories.ProductID','=','productdetails.ProductID')
             ->select('categories.CategoryType')
            ->whereRaw('categories.ProductID='.$data.'')
            ->get());

        return view('subcategory')->with([
            'productdetail'=>$productdetail,
            'category' => $category,

        ]);


    }
Posted by: Guest on March-08-2022

Browse Popular Code Answers by Language