_andypeacock
custom toggle action
Almost got it sorted. The livewire component is rendered via the action view() which renders a view consisting of only the livewire component (that seems inefficient, but it's the only way I know to render livewire in the view). The UI toggles, and it's internal state changes. Just need to work out how to get that state back into the action. I'll share code later today when I'm back at my pc
10 replies
custom toggle action
I've never gotten my head round how to get livewire working properly for passing properties. I've been busy spamming ChatGPT and Clause, and still can't get it working 😦 I think I'm going to give up and try again tomorrow.
10 replies
The right approach to a multi-user type
I do. I've added middleware to A) get the subdomain/domain to identify the tenant, and store the tenant on the request, B) check the user's access to that tenant, and C) check they have access to that panel on that tenant. The reason for the later is that (possibly) a user might have one role in one tenant, and another role in another tenant, and the two roles need different panels in my case. However, you could accomplish the same thing just by showing/hiding navigation items based on user role.
8 replies
The right approach to a multi-user type
Agreed. I've built my boilerplate around four roles: superadmin (me), tenant owner, tenant staff, and the tenant's customers. I've got 3 panels: one for me, one for tenant owner + staff, one for the tenant's customers. Keep it nice and separated, trust me.
8 replies