Created
September 14, 2022 13:27
-
-
Save paperscissors/ba507aff7a4e5cc8bc0c8d840de293cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function getSummaryAttribute() | |
{ | |
$summary = Str::words($this->description, 250, '...'); | |
$summary = html_entity_decode($summary); | |
$summary = html_entity_decode($summary); | |
$summary = html_entity_decode($summary); | |
$summary = html_entity_decode($summary); | |
$summary = htmlspecialchars_decode($summary); | |
return strip_tags($summary); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment