Jak przyciąć sznur w Laravel
{{ \Illuminate\Support\Str::limit($productVal, 20, $end='...') }}
Elegant Elk
{{ \Illuminate\Support\Str::limit($productVal, 20, $end='...') }}
#at AppServiceProvider
Blade::directive('trim', function ($string) {
$string = urldecode($string);
$string = trim($string);
return "<?php echo $string; ?>";
});
#And use on Blade template
@trim('Hello world !')