Il metodo
\Illuminate\Support\Str::words(phrase, n)
estrae n parole dalla stringa phrase
Utile per fare excerpt
Se si usano dei tag html nella frase, usare i metodi html_entity_decode e strip_tags per gestirli:
\Illuminate\Support\Str::words(
html_entity_decode(
strip_tags($article->post_content)
),
25
)