henryoladj
2 months ago
409
21
Laravel

Unique Slug Duplicate Entry

Posted 2 months ago by henryoladj

On my website i have a slug which is unique, but once users try to post same news it shows this error Integrity constraint violation: 1062 Duplicate entry.

Please how can i resolve this by saying post already made or by adding the slug url with an id of the news at the back i.e localhost:8000/post/welcome-to-my-post-1 if the ID of the post is 1

Thanks

Please sign in or create an account to participate in this conversation.