Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit f84ccd3

Browse files
committed
allow nullable returns
1 parent f6f2154 commit f84ccd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Sluggable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
trait Sluggable
88
{
9-
public static function findBySlug(string $slug): self
9+
public static function findBySlug(string $slug): ?self
1010
{
1111
return self::where('slug', strtolower($slug))->first();
1212
}

0 commit comments

Comments
 (0)