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...?
What is a Helper Function? A helper function usually comes in handy if you want to add a feature to your Laravel application that can be used at multiple locations within your controllers, views, or model files. These functions can be considered as global functions.
Laravel 9 provides New Query Builder Interface, making it easier for developers to work with. Laravel 9 has made some major improvements required in the Laravel 8, including Symfony 6.0 support. Flysystem 3.0 has improved more in comparison to previous versions.
The latest Laravel version is version 9, which was released on February 8, 2022.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With