I am a happy Laravel user and I love the Laravel helpers. They are very easy to use:
{{ str_limit($text) }}
But really really don't understand why this is they way:
{{\Illuminate\Support\Str::limit($text)}}
Why...?
I am a happy Laravel user and I love the Laravel helpers. They are very easy to use:
{{ str_limit($text) }}
But really really don't understand why this is they way:
{{\Illuminate\Support\Str::limit($text)}}
Why...?
The reason for deprecating them in Laravel 5.8 being that they add a lot of fucntions to the global namespace and in addition to that they migth conflict withe packages as well. Taylor Otwell has said in the PR ,
From the pull request:
They pollute the global namespace and they don't bring any additional value to the framework. They don't even save you the amount of characters that you have to type as in a bunch (or maybe in all?) of cases it's actually shorter to use the Arr and Str methods directly.
https://github.com/laravel/framework/pull/26898
If you still want to use them you can install the laravel/helpers package