-
-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Ability to customize url format #167
Comments
@tomschlick I like that idea a lot. Would users still retain the ability to edit their post slugs? That came into play as users in other countries had language difficulties that necessitated the request for editing slugs. If that will still be the same, then I see no reason why we can't merge in a PR doing what you propose. |
Yeah I don't see any reason why that wouldn't work. The route wouldn't care what the slug was, it just passes it back to the controller to parse & query the database. I'll probably create this as two PRs. One for the named routes and another for the url params. |
What is the status for this?
etc.. i have seen that there has been some discussion about it, but is it still ongoing? |
@joelstahre Yes, this is still a feature being developed on. Will let you know more as soon as possible. |
First off, thanks for taking the time to create the issue. Closing because everything v3.x related will remain as-is and won’t receive anymore updates. The next release is slated for this week, so stay tuned! |
Instead of
/blog/{slug}
I'd like to use/{year}/{month}/{day}/{slug}
. As far as I can see, I can change the path in theroutes/web.php
file but that doesn't persist through the site because you're not using Laravel's named routes.I can come up with a PR for this if you'd like. Basically my approach would be this:
Frontend\BlogController@showPost
, accept any of the following as parameters (slug, year, month, day, post id, etc). When present, all will be used as where() conditions when finding the post.From there all someone has to do is customize the routes file and it should just work. There might be a few more things to this later down the road related to #95 and upgrading but I don't think it's something that would be too hard to work past.
Thoughts?
The text was updated successfully, but these errors were encountered: