after upgrade panel with tenant got 500 error

Hi i just upgrade v3 to v4. On v3 panel with ->tenant(model: Company::class, slugAttribute: 'slug') works, but after upgrade i got 500 error without any log (storage\log\laravel.log), so i can't debug what happend!! if i remove ->tenan(xxx) from the panel, all work. i create a new panel using php artisan make:filament-panel clients, add ->tenant(xxx) and got the same error !! I'm using php artisan serve, because i testing on local. All the User Model configuration: implements FilamentUser, HasDefaultTenant, HasName, HasTenants and public function canAccessPanel(Panel $panel) public function canAccessTenant(Model $tenant) public function getFilamentName(): public function getTenants(Panel $panel) are the same from v3 .. how can i debug this error !
Solution:
I add on panel: ->tenant(model: Company::class, slugAttribute: 'slug',ownershipRelationship: 'users') ownershipRelationship !!!...
Jump to solution
1 Reply
Solution
marianov24
marianov242mo ago
I add on panel: ->tenant(model: Company::class, slugAttribute: 'slug',ownershipRelationship: 'users') ownershipRelationship !!! and on the resource, if don't have user_id: protected static ?string $tenantOwnershipRelationshipName = 'company'; it's very hard debug without logs 😄

Did you find this page helpful?