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

Route not found #11

Open
open-soft-app opened this issue Aug 22, 2024 · 1 comment
Open

Route not found #11

open-soft-app opened this issue Aug 22, 2024 · 1 comment

Comments

@open-soft-app
Copy link

when generating a new crud on a plural table, the route is created in the singular, but the references are in the plural. There is therefore an error when using the route: throw new RouteNotFoundException("Route [{$name}] not defined.");.

The error is on line 276 in the command vendor\takielias\tablar-crud-generator\src\Commands\GeneratorCommand.php.

The fix to apply is: '{{modelRoute}}' => $this->options['route'] ?? Str::kebab(Str::plural($this->name, 1)), instead of '{{modelRoute}}' => $this->options['route'] ?? Str::kebab(Str::plural($this->name)),

@takielias
Copy link
Owner

@open-soft-app Could you please make a PR?

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

No branches or pull requests

2 participants