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

404 in slugable records #114

Closed
isaeken opened this issue Mar 7, 2021 · 4 comments · Fixed by #167
Closed

404 in slugable records #114

isaeken opened this issue Mar 7, 2021 · 4 comments · Fixed by #167
Labels
bug Something isn't working confirmed

Comments

@isaeken
Copy link

isaeken commented Mar 7, 2021

a basic solution
static::getModel()::where(self::getRouteKeyName(), $record)->firstOrFail();

https://github.com/laravel-filament/filament/blob/9414a1aa80ae20b07e29707916c9d408efbe50e9/src/Resources/Pages/EditRecord.php#L58

@danharrin
Copy link
Member

Sorry, what's the issue you're facing?

@danharrin danharrin added bug Something isn't working needs more info labels Mar 7, 2021
@isaeken
Copy link
Author

isaeken commented Mar 9, 2021

i changed model route key name using getRouteKeyName (https://laravel.com/docs/8.x/routing#customizing-the-default-key-name)

the model urls is generating correctly but edit page returns 404. I'am fixed this in local using code in my first comment.

@danharrin
Copy link
Member

Thanks! Will get a fix pushed out.

@danharrin
Copy link
Member

Fixed by #167.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants