substr laravel code example
Example 1: laravel description substring
{{Str::limit($category->name, 20)}}
if to end
{{Str::limit($category->name, 20, $end='.......')}}
or
{{\Illuminate\Support\Str::limit($category->name, 20)}}
Example 2: take 10 character from string using php
$return_string = substr("Hi i am returning first 10 characters.", 0, 10);
Output:
"Hi i am re"