laravel-code-generator: Error when try to generate resources from database
Environment:
- Laravel-Code-Generator Version: 2.2.7
- Laravel Version: 5.5.28
Description:
When I tried to generate a resource file from any table apart from users I got the next error:
In Field.php line 1117:
Undefined index: labels
Steps/Commands To Reproduce:
e.g:
php artisan create:resources --routes-prefix=admin --table-exists --views-directory=groups Group
groups table has an id and a varchar field
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23
Still unsure what could be causing the issue. Try to rename the following file
resources/laravel-code-generator/system/migration_tracker.json
to something else likeresources/laravel-code-generator/system/migration_tracker_old.json
and try running the command again.If that does not work, I suggest you try to debug the
createVirtualMigration()
method.From inside of the
createVirtualMigration()
method try to adddd('test');
after each line “one at a time” until you find out which line seems to be causing the problem.