I have created a class in App\Helpers\IdTransformer
theres just two functions there.
I have registered it in aliases array in my app.php in config\app
'aliases' => Facade::defaultAliases()->merge([
// 'Example' => App\Facades\Example::class,
'IdTransformer' => App\Helpers\IdTransformer::class,
])->toArray(),
then i do, php artisan config:clear and php artisan config:cache
i can successfully access the file, in my code, but the Intelephense cannot find it. and it is so annoying. what must i do?
If you want to use your favorite helper file in Laravel programs, you should put it in the composer.json file and provide autoload, please pay attention to the example below:
Add the following presentation to the ./composer.json file and in the autoload section:
At the end type the following command:
In any part of your Laravel application, you can use the functions in IdTransformer.php as follows:
At the same time, hit the command