29
29
use Statikbe \FilamentFlexibleContentBlocks \Models \Contracts \HasSEOAttributes ;
30
30
use Statikbe \FilamentFlexibleContentBlocks \Models \Contracts \Linkable ;
31
31
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
35
33
{
36
34
use HasAuthorAttributeTrait;
35
+ use HasAuthorAttributeTrait;
36
+ use HasCodeTrait;
37
37
use HasDefaultContentBlocksTrait;
38
38
use HasFactory;
39
- use HasTranslatedHeroImageAttributesTrait ;
39
+ use HasParentTrait ;
40
40
use HasTranslatedContentBlocksTrait;
41
+ use HasTranslatedHeroImageAttributesTrait;
41
42
use HasTranslatedIntroAttributeTrait;
42
43
use HasTranslatedOverviewAttributesTrait;
43
44
use HasTranslatedPageAttributesTrait;
44
45
use HasTranslatedSEOAttributesTrait;
45
46
use HasTranslatedSlugAttributeTrait;
46
- use HasCodeTrait;
47
- use HasParentTrait;
48
- use HasAuthorAttributeTrait;
49
47
50
48
public function getTable ()
51
49
{
@@ -54,7 +52,7 @@ public function getTable()
54
52
55
53
public function getViewUrl (?string $ locale = null ): string
56
54
{
57
- //toggle the locale to make sure the slug gets translated:
55
+ // toggle the locale to make sure the slug gets translated:
58
56
/*$currentLocale = app()->getLocale();
59
57
$locale = $locale ?? $currentLocale;
60
58
@@ -71,7 +69,8 @@ public function getPreviewUrl(?string $locale = null): string
71
69
return $ this ->getViewUrl ($ locale );
72
70
}
73
71
74
- public static function getUrl (string $ code , ?string $ locale = null ): ?string {
72
+ public static function getUrl (string $ code , ?string $ locale = null ): ?string
73
+ {
75
74
return static ::code ($ code )
76
75
->first ()
77
76
?->getViewUrl($ locale );
0 commit comments