Skip to content

Commit 379ecfc

Browse files
committed
Update boot method as per laravel/framework#59260 (comment)
1 parent 50d0c8a commit 379ecfc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Sluggable.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ trait Sluggable
1818
*/
1919
public static function bootSluggable(): void
2020
{
21-
static::observe(app(SluggableObserver::class));
21+
static::whenBooted(function () {
22+
static::observe(app(SluggableObserver::class));
23+
});
2224
}
2325

2426
/**

0 commit comments

Comments
 (0)