Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue with array_map() expects parameter 1 to be a valid callback, class 'Str' not found in getSortedSingularTableNames #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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