2929use Statikbe \FilamentFlexibleContentBlocks \Models \Contracts \HasSEOAttributes ;
3030use Statikbe \FilamentFlexibleContentBlocks \Models \Contracts \Linkable ;
3131
32- class Page extends Model
33- implements HasContentBlocks, HasHeroImageAttributes, HasIntroAttribute, HasMedia, HasMediaAttributes,
34- HasOverviewAttributes, HasPageAttributes, HasSEOAttributes, Linkable, HasCode, HasParent
32+ class Page extends Model implements HasCode, HasContentBlocks, HasHeroImageAttributes, HasIntroAttribute, HasMedia, HasMediaAttributes, HasOverviewAttributes, HasPageAttributes, HasParent, HasSEOAttributes, Linkable
3533{
3634 use HasAuthorAttributeTrait;
35+ use HasAuthorAttributeTrait;
36+ use HasCodeTrait;
3737 use HasDefaultContentBlocksTrait;
3838 use HasFactory;
39- use HasTranslatedHeroImageAttributesTrait ;
39+ use HasParentTrait ;
4040 use HasTranslatedContentBlocksTrait;
41+ use HasTranslatedHeroImageAttributesTrait;
4142 use HasTranslatedIntroAttributeTrait;
4243 use HasTranslatedOverviewAttributesTrait;
4344 use HasTranslatedPageAttributesTrait;
4445 use HasTranslatedSEOAttributesTrait;
4546 use HasTranslatedSlugAttributeTrait;
46- use HasCodeTrait;
47- use HasParentTrait;
48- use HasAuthorAttributeTrait;
4947
5048 public function getTable ()
5149 {
@@ -54,7 +52,7 @@ public function getTable()
5452
5553 public function getViewUrl (?string $ locale = null ): string
5654 {
57- //toggle the locale to make sure the slug gets translated:
55+ // toggle the locale to make sure the slug gets translated:
5856 /*$currentLocale = app()->getLocale();
5957 $locale = $locale ?? $currentLocale;
6058
@@ -71,7 +69,8 @@ public function getPreviewUrl(?string $locale = null): string
7169 return $ this ->getViewUrl ($ locale );
7270 }
7371
74- public static function getUrl (string $ code , ?string $ locale = null ): ?string {
72+ public static function getUrl (string $ code , ?string $ locale = null ): ?string
73+ {
7574 return static ::code ($ code )
7675 ->first ()
7776 ?->getViewUrl($ locale );
0 commit comments