vigneshc91 / laravel-test-generator

Auto generate laravel unit test file based on the routes and form request files
https://vigneshc91.github.io/laravel-test-generator/
MIT License
21 stars 22 forks source link

Call to undefined function Vigneshc91\LaravelTestGenerator\starts_with() #6

Open wafik opened 3 years ago

wafik commented 3 years ago

i have just install laravel 7.0 test generator when run php artisan laravel-test:generate show the error **Call to undefined function Vigneshc91\LaravelTestGenerator\starts_with()

at C:\laragon\www\sinau\laravelapinasabah\vendor\vigneshc91\laravel-test-generator\src\Generator.php:138**

protected function getRouteUri(Route $route) 135▕ { 136▕ $uri = $route->uri(); 137▕ ➜ 138▕ if (!starts_with($uri, '/')) { 139▕ $uri = '/' . $uri; 140▕ } 141▕ 142▕ return $uri;

Glenn-Santos commented 3 years ago

You just need to do this @wafik

composer require laravel/helpers

since Laravel removed str and array functions in version 6 and up.

Oxicode commented 3 years ago

¬¬!