Support the ongoing development of Laravel.io →
posted 7 years ago
Views
Last updated 7 months ago.
0

What exactly isn't working? I'm guessing you don't have a category with the correct 'sef'.

If this is your route: 'maincat/cat2/cat3/item', then it'll assume $cat4 is item so do you have a category where 'sef' is equal to 'item'?

Last updated 7 years ago.
0

yeah laravel wouldnt know how to differentitate category/item you give in url e.g

url.com/category1/item or url.com/category1/category2....

to laravel they look the same.. so you probably need to change the way you are serving either by adding another hardcoded stuff so like:

url.com/category/men/item/clothes << item is hardcoded.. which you can then use routing

but to be honest when you are showing ITEMS you shouldnt have something like url.com/category1/category2/categroy3/item..

just do url.com/items/itemid

and then on the items you can have a breadcrumb showing you how the item is located on yoru site..

0

Sign in to participate in this thread!

LoadForge

Your banner here too?

schel4ok schel4ok Joined 15 Feb 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.