Add icon for slider
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
1ba46f7532
commit
091a9a5bde
|
@ -23,7 +23,7 @@
|
|||
{{post.intro}} …
|
||||
</div>
|
||||
<div class="flex px-6 py-3 bg-gray-100 items-center border border-t">
|
||||
{{'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')}}
|
||||
<span class="text-sm text-gray-600">Beitrag anschauen</span>
|
||||
</div>
|
||||
</a>
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue