James
What should I be testing?
Yeah that's kind of where I am at trying to deal with the tension between being redundant with FIlament's own test suite, and testing that I implemented it correctly. It would almost be nice if there was some Filament test helper that could assert an implementation without having to actually run any Filament code to save it to the DB, almost be able to do a Unit style test with no DB.
6 replies
Users Resource on Multitenant Setup with Pivot Data
For example I can get to the first member record for a user using
$user->teams->first()->pivot
I just need to get the current tenant instead of which ever tenant is in the first matching member record.15 replies
Users Resource on Multitenant Setup with Pivot Data
Forget the roles, thats the easy part. Members is the pivot between Users and Teams which has many to many relationship. I need to way to get to the member record that matches the current tenant and current user from the current user.
15 replies
Users Resource on Multitenant Setup with Pivot Data
Is there a way maybe to setup a custom relationship from the user model direct to the instance of the member model that matches the current tenant maybe so I could just do something like
$user->member->role->name
maybe?15 replies