F
Filament10mo ago
sven

Specify 'id' col for editpage

I have a resource, which defines a join as part of its getEloquentQuery. Viewing records works just fine, however the EditRecord crashes because it tries to access coloum id instead of foos.id (which is neccessary because of the join). Can I change that behaviour?
Solution:
Found it! (I always see it after submitting the question xD sorry guys) ```php public static function getRecordRouteKeyName(): ?string {...
Jump to solution
1 Reply
Solution
sven
sven10mo ago
Found it! (I always see it after submitting the question xD sorry guys)
public static function getRecordRouteKeyName(): ?string
{
return 'foos.id';
}
public static function getRecordRouteKeyName(): ?string
{
return 'foos.id';
}
Want results from more Discord servers?
Add your server