Answers for "how to trim description on two lines in laravel blade file"

PHP
0

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 !')
Posted by: Guest on March-17-2021

Code answers related to "how to trim description on two lines in laravel blade file"

Browse Popular Code Answers by Language