Laravel-5-Generators-Extended
Laravel-5-Generators-Extended copied to clipboard
fixed issue with array_map() expects parameter 1 to be a valid callback, class 'Str' not found in getSortedSingularTableNames
fixed ErrorException : array_map() expects parameter 1 to be a valid callback, class 'Str' not found
in PivotMigrationMakeCommand.php located at function getSortedSingularTableNames on line 171
I solved this with an arrow function instead:
$tables = array_map(fn($table) => Str::singular($table), $this->getTableNamesFromInput());
But I don't know which is the best solution.
I face the same error, would be great to get pulled in 😊
If you're impatient like me, add this to your composer.json and run composer update
then you should be able to receive the fork from @YosefOberlander:
"require-dev": {
"laracasts/generators": "dev-master", // change this to dev-master
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/YosefOberlander/Laravel-5-Generators-Extended"
}
],