Clay Bitner
Success Notification for CreateOptionAction with injected created Record
It's not the most satisfactory answer... In fact, I don't really like it at all, but what I've seen work so far is to use the $data prop on the after function to search for the record with the exact values you just created.
3 replies
Adding a search to Tenant Menu
For anyone who's trying to figure it out themselves, I had the file in the wrong spot.
It needed to go in
reosources/views/vendor/filament-panels/components/tenant-menu.blade.php
I was then able to add code to add a search box.5 replies
Does Spatie Media Library work with Vapor over 4.5mb?
Turns out that somehwere along the line, whether that's in the Filament FileUpload or somewhere else, it does indeed send it to s3 directly, so it works with Vapor out of the box. I had to make sure that I had a few variables properly set in the .env file, but it works nicely:
21 replies
Using Spatie's Laravel-permission, is there a way to assign roles to a pivot table?
Within the app, there are these groups where people can have chats and discussions and share pictures and the like. A user might have the role of "moderator" in one group (which allows them to add pictures, add new posts, remove posts, edit comments), but not another group, even if they are in both groups. In another group they may just have the role of "user" which allows them to view posts and pictures, for example. But a group exists within an organization (tenant), so there are multiple layers. From a UX perspective, when you add a user to a group, you'd want to define their role at the same time - because that's where the association lies.
5 replies
Using Spatie's Laravel-permission, is there a way to assign roles to a pivot table?
I've tried it in a few ways. First is within the UsersRelationManager within the GroupResource RelationManagers.
Another place is within the UserResource when creating a user within the Tenant Admin panel.
Inside the form, it looks like this:
Would you have any advice on how to approach it, though? Is there something I should be changing in the user model?
I have these functions defining the groups and tenants within the User model:
5 replies