string limit in laravel code example
Example 1: {{Str::limit laravel
{{Str::limit($category->name, 20)}}
if to end
{{Str::limit($category->name, 20, $end='.......')}}
or
{{\Illuminate\Support\Str::limit($category->name, 20)}}
Example 2: limit laravel
$posts = Post::all()->limit(10)->get();