Skip to content

Commit d9c4dda

Browse files
committed
Fixed generation slug without trashed
1 parent 661a36d commit d9c4dda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Models/Post.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static function boot()
8787
$slug = Str::slug($post->title);
8888
$i = 1;
8989

90-
while (static::where('slug', $slug)->withTrashed()->exists()) {
90+
while (static::where('slug', $slug)->exists()) {
9191
$slug = Str::slug($post->title).'-'.$i++;
9292
}
9393

0 commit comments

Comments
 (0)