I have a method that truncates a string.
StringHelper::truncate()
When I use this method, in my opinion, it cannot find the StringHelper class. I added it to composer.json and autostored the dump.
It works when I specify the full path:
\App\Http\Helpers\StringHelper
But I would like to have the first option.
How can i do this? Perhaps AppServiceProvider, but how?
source share