diff --git a/src/Concerns/HasLayouts.php b/src/Concerns/HasLayouts.php index 03d340e..180f1cf 100644 --- a/src/Concerns/HasLayouts.php +++ b/src/Concerns/HasLayouts.php @@ -61,7 +61,7 @@ public static function indexLayout(): Layout public static function layouts(): Collection { if (! static::customizeableLayout()) { - return new Collection(); + return new Collection; } $layoutModel = static::layoutModel(); diff --git a/src/Exceptions/ContentableException.php b/src/Exceptions/ContentableException.php index 53e7ac5..a7a9711 100644 --- a/src/Exceptions/ContentableException.php +++ b/src/Exceptions/ContentableException.php @@ -4,6 +4,4 @@ use Exception; -class ContentableException extends Exception -{ -} +class ContentableException extends Exception {} diff --git a/src/Models/Content.php b/src/Models/Content.php index 0375bd5..081b656 100644 --- a/src/Models/Content.php +++ b/src/Models/Content.php @@ -21,7 +21,7 @@ class Content extends Model implements ContentInterface protected static function boot() { static::saved(function (ContentInterface $content) { - $content->contentable->clearCache(); + $content->contentable?->clearCache(); }); parent::boot();