Answers for "blade show limited characters"

PHP
3

{{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)}}
Posted by: Guest on December-05-2020
1

how to truncate the given string to the specified length in blade.php

#insert this line in blade.php it will truncate your string
#first parameter accept the string to be truncate 
#second parameter accept the lenght 
$third accept waht should print after the truncate string
{{ \Illuminate\Support\Str::limit($string, 150, $end='...') }}
Posted by: Guest on January-19-2021

Browse Popular Code Answers by Language