Generating Excerpts of Text
Learn how to generate an excerpt of text with the help of examples.
We'll cover the following...
The excerpt
helper method
It is used to generate an excerpt from a piece of text based on the first occurrence provided phrase. This method is handy for displaying the results of a user search. The basic structure of the excerpts
is shown below:
Press + to interact
<?php/*** Version: Laravel 9** @return string|null*/public static function excerpt(string $text,string $phrase = '',array $options = []);
The ...