{{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)}}
{{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)}}
laravel trim string blade
#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 !')
how to trim string in laravel
{{ \Illuminate\Support\Str::limit($productVal, 20, $end='...') }}
how to trim text php
$text = " hello world ";
$text = trim($text);
=> "hello world"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us