Home » Php » php – laravel 6: undefined index

php – laravel 6: undefined index

Posted by: admin February 25, 2020 Leave a comment

Questions:

I am trying to generate from tables using infyom generators but am getting an error here below

[email protected] MINGW64 /d/xammp/htdocs/projectMain (6.0) $ 
  php artisan infyom:scaffold Voting --fromTable--tableName=votings

ErrorException : Undefined index: votings

at D:\xammp\htdocs\projectMain\vendor\infyomlabs\laravel-generator\src\Utils\TableFieldsGenerator.php:342

338|     private function checkForRelations($tables)
339|     {
340|         // get Model table name and table details from tables list<br>
341|         $modelTableName = $this->tableName;
342|         $modelTable = $tables[$modelTableName];
343|         unset($tables[$modelTableName]);
344|
345|         $this->relations = [];
346| 

Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError(“Undefined index: votings”, “D:\xammp\htdocs\projectMain\vendor\infyomlabs\laravel-generator\src\Utils\TableFieldsGenerator.php”, [“votings”])

D:\xammp\htdocs\projectMain\vendor\infyomlabs\laravel-generator\src\Utils\TableFieldsGenerator.php:342

2 InfyOm\Generator\Utils\TableFieldsGenerator::checkForRelations()

D:\xammp\htdocs\projectMain\vendor\infyomlabs\laravel-generator\src\Utils\TableFieldsGenerator.php:290

How to&Answers: