404 while using special record identifier

My Identifier of a record is a steam identifier like steam:11000011c670bc3 I have the following Structure:
create table users
(
identifier varchar(50) null,
license varchar(50) null,
constraint identifier
unique (identifier),
)
create table users
(
identifier varchar(50) null,
license varchar(50) null,
constraint identifier
unique (identifier),
)
My Model:
class SpecialUser extends Model
{
use HasUuids;

protected $connection = 'special';
protected $table = 'users';
protected $primaryKey = 'identifier';
}
class SpecialUser extends Model
{
use HasUuids;

protected $connection = 'special';
protected $table = 'users';
protected $primaryKey = 'identifier';
}
Resource Pages:
public static function getPages(): array
{
return [
'index' => Pages\SpecialUsers::route('/'),
'edit' => Pages\SpecialUser::route('/{record}/edit'),
];
}
public static function getPages(): array
{
return [
'index' => Pages\SpecialUsers::route('/'),
'edit' => Pages\SpecialUser::route('/{record}/edit'),
];
}
If I now try to edit an User i receive 404:
http://special-acp.example.localhost/acp/special-users/steam:11000011c670bc3/edit
http://special-acp.example.localhost/acp/special-users/steam:11000011c670bc3/edit
No description
3 Replies
Iven S. | LvckyWorldᶜʳᵉʷ
the identifier is existing 100% as it was shown in table listing
No description
Iven S. | LvckyWorldᶜʳᵉʷ
cause its not a valid UUID but i dont have UUID or other ID
Matthew
Matthew2w ago
Try putting this in your model class:
public function getRouteKeyName()
{
return 'identifier';
}
public function getRouteKeyName()
{
return 'identifier';
}

Did you find this page helpful?