Hi have an issue with a particular URL structure I am after.
Let's say we are comparing two products and I have it set up like so:
Route::get('/{company_slug}/{name_slug}/vs/{company_slug_two}/{name_slug_two}', 'CompareController@compareTwoProducts');
but ideally I'd like to create url's like this:
I don't believe dashes work within the route and it could create issues with the slug I suppose, it seems like underscores are supported within the laravel route system so I thought I could set up a URL structure like so:
Route::get('/{company_slug}_{name_slug}_vs_{company_slug_two}_{name_slug_two}', 'CompareController@compareTwoProducts');
However this does not work, not sure why (notfoundhttpexception) and my thinking was to replace the underscores by dashes with the htaccess.
Could this work or any alternative suggestions?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire