# Filament v4 + Binary UUID v7 - Edit Route Issue## Context
I'm working with Laravel 12 and Filament 4.x, using binary UUID v7 (16 bytes) as primary keys in
users and invoices tables. The goal is to store UUIDs in binary format in the database for better performance, but expose them as UUID v7 strings (36 characters) in routes and Filament's interface.Main Problem
Filament edit routes are generating URLs with malformed UUIDs and returning 404. For example:- Generated URL:
https://binaryuuid.test/admin/invoices/30313961-6637-6534-2d63-3933652d3733/edit - Error: 404 Not Found
- Expected UUID:
019af7e4-c93e-73f9-a5ab-bc6e56c25535
Current Architecture
Database
columns areidbinary(16)to store UUIDs in binary format- Affected tables:
users,invoices,customer_identities,invoice_items
HasBinaryUuidtrait that handles conversion between binary and UUID string- Custom
BinaryUuidcast implementingCastsAttributes - Overridden methods:
getKey()- returns UUID string
getRouteKey()- returns UUID string for routes
getAuthIdentifier()- returns binary (16 bytes) for sessions
resolveRouteBinding()- converts UUID string to binary for lookups
getAttributes()- converts binaries to UUID strings for Livewire
EditInvoicepage with overriddenmount()to manually resolve the recordmutateFormDataBeforeFill()method to convert binaries to UUID strings before serialization