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

Unique category slug #22

Open
cojocaru opened this issue Mar 9, 2014 · 4 comments
Open

Unique category slug #22

cojocaru opened this issue Mar 9, 2014 · 4 comments

Comments

@cojocaru
Copy link
Contributor

cojocaru commented Mar 9, 2014

Hi,

When I try to save a category with the same name , because the slug has to be unique I get an Illuminate \ Database \ QueryException .

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'aaa' for key 'categories_slug_unique' (SQL: insert into categories (name, slug, description, order, updated_at, created_at) values (aaa, aaa, aaaa, 4, 2014-03-09 19:57:16, 2014-03-09 19:57:16))

I will try to fix this in one fork soon, so if it will not be fixed meanwhile will propose a pull request, thx.

@stidges
Copy link
Member

stidges commented Mar 9, 2014

Could you tell me the use case for having the same category twice? I can't think of a reason why you would want to have that :)

@dabernathy89
Copy link

@stidges I think @cojocaru just means the exception should be caught

@stidges
Copy link
Member

stidges commented Mar 9, 2014

Oh of course... Sorry about that, thanks for the clarification :)

@cojocaru
Copy link
Contributor Author

@dabernathy89, @stidges yep, this was what I meant, of course you never need the same name , esp for categories.

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

No branches or pull requests

3 participants