Support the ongoing development of Laravel.io →
posted 8 years ago
Requests
Last updated 2 years ago.
0

I guess your city route is after the home route, since there is the city? (question mark, making it optional)

If it would be before, just / would pass the condition and go to city

Generally, i think yes, just remove the question mark, and you're good to go, if URI just having one parameter would be city,

Something else would be '/something/{city}' or '/{city}/something'

I guess first thing in your controller is checking for 1 ocurrence where city = $city, and if not, redirect to your not found page...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

chrisaz chrisaz Joined 4 Jan 2016

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.

© 2024 Laravel.io - All rights reserved.