f82a3ebc57
Root cause of the "Fișa #0" bug: the page had public ?WorkOrder \$record = null; and the route slug was work-orders/{record}/dashboard. Livewire/Laravel saw the {record} param and the typed \$record property with the same name and attempted route model binding via BelongsToTenant scope. When that resolution didn't return a Model instance in a Livewire hydration context, mount() ended up being called with 0, so the button worked but the destination page redirected saying "Fișa #0". Fix: rename the route parameter to {wo} so it no longer collides with the property name, receive it as int|string in mount(), and do the find() ourselves. The property stays as \$record for the Blade view but is now always populated by our own code. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>