📜  laravel 修剪字符串刀片 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:58.105000             🧑  作者: Mango

代码示例3
#at AppServiceProvider

Blade::directive('trim', function ($string) {
            $string = urldecode($string);
            $string = trim($string);
            return "";
        });

#And use on Blade template

@trim('Hello world !')