Reputation: 12551
I created a new Laravel 7 project and none of the framework helper functions after available.
For instance, if I run studly_case('blah')
in Tinker I get:
PHP Fatal error: Call to undefined function studly_case() in Psy Shell code on line 1
I've done the usual:
composer install
composer dumpautoload
However, no luck.
Do helper functions need some special composer include in v7 that isn't done by default?
Upvotes: 1
Views: 982
Reputation: 18916
To include deprecated helper functions you have to use the project helpers.
composer require laravel/helpers
Laravel has been moving away from helpers and want people to use the static implementations. An Alternative is to call it on the Str implementation.
Str::studly('studly');
Upvotes: 1