Part 24 ½ - Fixing a Slug Bug [How to Build a Blog with Laravel Series]

محسن
232 بار بازدید - 7 سال پیش - Ok, so we had a
Ok, so we had a small bug in our last video. I thought we were done with the slugs, but as a helpful commenter pointed out, if you try to edit a post and save it without changing the slug, then you will get an error saying that the slug is not unique. When I thought about this for a second, it made sense. We take the same slug and then check if it's unique. Of course it is not unique because it exists in our current post. So it will always turn an error unless you change the slug every time. Today#0
7 سال پیش در تاریخ 1396/04/27 منتشر شده است.
232 بـار بازدید شده
... بیشتر