F
Filament2y ago
Eren

getRouteKeyName()

public function getRouteKeyName() { return 'slug'; // db column name } I have a model and using keyname but now i have problem with filament error because slug is coming from relationship for multi language system. How can i use id , instead of slug filament resource ? I dont want to remove getroutekeyname. Its necessarry for my project.
3 Replies
Eren
ErenOP2y ago
Missing required parameter for [Route: filament.resources.tour/products.edit] [URI: admin/tour/products/{record}/edit] [Missing parameter: record]. Thats my error btw. {record} was slug before but now it cant be slug because its dynamic. It should be id. Okay. I remove it from models. I couldnt find any different way 🙂
Andrew Wallo
Andrew Wallo2y ago
Not sure about your use case but I did something similar on a custom page
Want results from more Discord servers?
Add your server