multi-tenancy Issue with SuperAdminSeeder

hello guys i'm using filament multi-tenancy and filament spatie permissions and roles but the SuperAdminSeeder is always giving me errors (super_admin role doesnt exist) the thing is the same exact Seeder was working fine before going with multi tenancy solution and the role already exists in the role table can someone help , i'm open for a call to show case the error thanks in advance guys
No description
1 Reply
SirFat
SirFat13mo ago
I am more curious how you got around the 'team' concept in spatie - how did you teach it how to access your 'team_id' or 'whateveryounamedit_id'? I get an error saying it cannot ascertain the 'team_id' - which when the system is running it appears to use setPermissionsTeamId() which can be set within Middleware... I'm trying to create a situation where the roles and associated permissions can be managed within the tenant separately from the other tenants. If I go without the 'teams' side of filament-shield - I then have an issue where it is using the vendor supplied Role class, which doesn't contain (obviously) a reference to my tenancy (in my case it's called company()) I was able to modify the source in 'helpers.php' to hardset the company ID to finish the setup, I will continue playing. Getting around the missing property issue, you can create your own normal 'Role' model and have it extend the spatie one - then change the reference in config/permissions.php - models -> role to your own model. Still working on the superadmin part. That said, yes, also seeing the error would help.
Want results from more Discord servers?
Add your server