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

Adding commonly used slugifying support to illuminate/support. #307

Closed
wants to merge 1 commit into from

Conversation

bencorlett
Copy link
Contributor

I've previously stated my objections to having a full-blown string class / package in Laravel 4 due to the fact that many applications do not require it and there are many, many different packages out there to cater for different needs.

However, I think slugifying strings is something many applications will use. Whether it be for your next simple blog post to have friendly URLs, or your next product management suite to give automatic SKUs to products (I could go on), most apps have a need to create a simple, URL friendly string.

I've done exactly this, by adding a Slugify class (open to suggestions on the name), with a str_slug() helper.

This PR relates to issue #69.

@drsii
Copy link

drsii commented Feb 13, 2013

+1

@ipalaus
Copy link
Contributor

ipalaus commented Feb 13, 2013

I really only miss the slug function... +1 :)

@brunogaspar
Copy link
Contributor

+1

@conradkleinespel
Copy link
Contributor

👍 !

@dardub
Copy link

dardub commented Feb 13, 2013

I use this one. +1

@darrennolan
Copy link

Agreed. I keep writing my own in every app I use.

@bencorlett
Copy link
Contributor Author

@darrennolan - I had a feeling there was a few of us doing this!

@taylorotwell
Copy link
Member

I think we need to consider introducing a String class into Support, and moving some of these helpers into said class.

@Anahkiasen
Copy link
Contributor

I would be all for the String class to be brought back and all of the currently str_ helpers to be moved into it.

@taylorotwell
Copy link
Member

I'm working on something to solve this.

@bencorlett bencorlett deleted the feature/slugs branch February 27, 2013 22:32
joelharkes added a commit to joelharkes/framework_old that referenced this pull request Mar 7, 2019
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.

9 participants