Skip to content
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

Allow to generate custom suffixes #289

Merged
merged 4 commits into from
Feb 28, 2025

Conversation

josepdecid
Copy link
Contributor

  • Added the ability to customize the generated suffix to ensure uniqueness.
  • Allow to force the suffix to be appended even to the first occurrence of the slug.

@@ -308,6 +308,38 @@ public function getSlugOptions() : SlugOptions
}
```

### Generating slug suffix on first occurrence
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a description of the functionality, could you also add a simple example on how such a slug would look like. That would really drive the point home.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Feel free to suggest any other change or improvement!

@freekmurze freekmurze merged commit c3e7f7f into spatie:main Feb 28, 2025
16 checks passed
@freekmurze
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants