Skip to content

Enforcing a trailing-slash policy #496

Answered by bakerkretzmar
ryczek02 asked this question in Q&A
Discussion options

You must be logged in to vote

There isn't a way to do this within Ziggy itself, no, but you can just wrap Ziggy's route() function to do it yourself.

Something like this should work, but let me know if you still have questions!

// Assuming the `route()` function already exists...

appRoute = (...args) => route(...args) + '/';

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ryczek02
Comment options

@bakerkretzmar
Comment options

Answer selected by ryczek02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #495 on January 07, 2022 20:17.