diff --git a/components/facebookpagefeed/default.htm b/components/facebookpagefeed/default.htm index 75c2a8f..ba181a2 100644 --- a/components/facebookpagefeed/default.htm +++ b/components/facebookpagefeed/default.htm @@ -23,7 +23,7 @@ {{post.intro}} …
- {{'facebook-square'|sprite('w-6 h-6 mr-3 fill-current text-primary-500')}} + {{post.page.icon|sprite('w-6 h-6 mr-3 fill-current text-primary-500')}} Beitrag anschauen
diff --git a/models/Page.php b/models/Page.php index 95202c0..b38f796 100644 --- a/models/Page.php +++ b/models/Page.php @@ -74,6 +74,11 @@ class Page extends Model return 'social/'.$this->slug.'/'; } + public function getIconAttribute(): string + { + return "{$this->type}-slider"; + } + public function beforeDelete() { $this->posts->each->delete();