There is a URL to come to: site.com/catalog/cat1/cat2/25-rose-1.html , where cat1 cat2 are categories, 25-rose is the product alias, and 1 is its ID.
I do this:
Route::get('catalog/{parentCategory}/{childrenCategory}/{productAlias}-{productId}.html', function($parentCategory, $childrenCategory, $productAlias, $productId){ echo 'Parent category: '. $parentCategory . ' Children category: '.$childrenCategory. ' Product alias: '.$productAlias. ' Product ID: '.$productId; }); But the result is:
Parent category: cat1 Children category: cat2 Product alias: 25 Product ID: rose-1 Question: how to make the product ID Laravel look at the last - in the link?