How to use 1 ,2 3 in slug laravel ?

Posted 1 month ago by raviawasti

i have a post table where i am saving id, name , slug etc like this

id:1, name:How to become a Tutor?, slug : how-to-become-a-tutor

Now if i want to save another data with same name like this

id:2, name:How to become a Tutor?, slug : how-to-become-a-tutor-1(i want to add integer 1 in slug like this)

, if same question asked again i want to add how-to-become-a-tutor-2

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