Skip to content

Conversation

YosefOberlander
Copy link

@YosefOberlander YosefOberlander commented Jun 13, 2021

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

fixed `ErrorException : array_map() expects parameter 1 to be a valid callback, class 'Str' not found` in function getSortedSingularTableNames
@pelmered
Copy link

pelmered commented Jul 6, 2021

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.

@simplenotezy
Copy link

I face the same error, would be great to get pulled in 😊

@simplenotezy
Copy link

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"
    }
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants