Hightower
User Relationship with Permissions
I want a relationship that links to the Users tables, but that only returns a set of users with a certain permission. This is what I've got so far:
It works to a point, but the dropdown I had on a form that worked perfectly before now shows the User ID rather than the Name. Can anyone advise please?
4 replies
order tenancy menu
Working on multi-tenancy (https://filamentphp.com/docs/3.x/panels/tenancy#customizing-the-tenant-menu). The tenant menu in top left is ordering by ID on the table, how can I alter this so it orders alphabetically on the title?
4 replies
Custom Summary Page
I've got an app that uses tenancy, what would be the best way to create a summary page that has a small summary table for each tenant? I'm guessing a custom page, but I'm finding the documentation a little sparse for my beginner brain. Can anyone point me?
16 replies
Table Columns from Database
Been trying to figure this for weeks, and gotten to the point I just need help!
I'm wanting a custom table, which gets the rows from a database table as normal, and the columns from another database table (rather than the standard database column names) to create a matrix of sorts.
Excusing the below mess showing where I'm up to (just trying to get it working at this stage), the action doesn't seem to be running when I click on a cell.
37 replies
Resource Structure
Hi all. Just wondered what the best way to approach this would be:
I am going to have a number of related resources, so say Documents, then DocumentStatuses and DocumentCategories etc. I’ve looked into Clusters but I don’t like the way the navigation takes up more screen space - I’d rather it was stacked. So I’ve created parents in the navigation which seems to work well enough.
My folder structure is then everything grouped is moved down a level, so App\Filament\Resources\Documents instead of App\Filament\Resources, to keep the grouping and stop the top folder getting too busy.
Does that sound a suitable solution? Has anyone got a better way to structure something like this?
6 replies
Filament Relation Manager - Form Not Updating
Hi, I have a Filament Relation Manager and it's working well for the table part, but the form isn't updating in the browser. For example, the form function is as below:
However, this isn't reflected in the browser. Can someone offer some insight to why? I'm guessing the form may be being defined elsewhere instead but I have no idea where to start looking.
46 replies
Filament Tenancy Help
I have a DocumentResource in an app with tenancy. The document can be associated with a Team ID or it can be null to represent a document that can be accessed by all Teams.
How would I then modify the query for the filament table to return the null records on top of the default view which is shown based on current tenancy.
I tried the following thinking I was a Laravel genius but of course this doesn't work when filters are applied.
Would appreciate any help.
6 replies
Spatie Roles & Permissions - Global
Hi,
I'm trying to utilise roles & permissions in my multi-tenancy Filament app, have it all working pretty nicely, but the issue is I have to create roles on each tenancy. I instead wish to have roles defined at a global level, so I only have to create a role once, but can then allocate it to user based on tenancy. For example, User1 is a standard user on Tenant1 and a privileged user on Tenant2. User 2 only has standard user on Tenant2 and no access to any other tenants.
I've created a global role to test it (where the team_id is left null), and whilst I can go in to a user and assign them to this global role, the global role does not show in the list of roles to be able to manage in the app. How can I get these roles into the table in the app, and allow them to be edited without having to do it direct in the database?
3 replies
SQLSTATE[42S02] Error - Multi Tenancy
I'm trying to figure out multi tenancy, have ran through a couple docs / youtube videos and getting the following error:
I have an academies table, but no academy_user - I'm not sure what this is, surely that should just be user? Appreciate any help on this as I'm a bit out my depth.
7 replies