i have a problem in my laravel code i have a product model and a category model i am trying to show the details for the product

public function productDetails($category_slug , $product_slug)
{
    if(Category::where('slug' , $category_slug)->exists())
    {
        if(Product::where('slug' , $product_slug)->exists());
        {
            $product = Product::where('slug' , $product_slug)->first();
            return view('show product details' , compact('product'));
        }
    }else{
        return redirect('/');
    }
}

// thats my controllerenter code here

{{ $product->id }}
{{ $product->name }}
{{ $product->description }}

image) }}” class=”cate-image” alt=”image here” style=”width: 75px;”>

//that’s my view where am trying to show the details of the product

Route::get(‘/product-details/{slug}/{name}’ , [CategoryController::class , ‘productDetails’])->name(‘product-details’);

//here is my route