Tim van Heugten
Tim van Heugten
FFilament
Created by Stormageddon, Dark Lord of All on 6/30/2024 in #❓┊help
Empty hidden fields
Multiple ways to go about this. On toggle you could set ‘the other value’ to null or on submit you could check the toggle and set the other value to null. What I also always like to do is self validate the model for this case, so that if whatever possible edge case / bug occurs the model can’t be saved.
4 replies
FFilament
Created by Gediminas on 7/1/2024 in #❓┊help
Can a MenuItem redirect to an external URL?
How about using a protocol? 😐
4 replies
FFilament
Created by Felix Schmid on 6/30/2024 in #❓┊help
Dynamically set current panel
Maybe you can borrow some inspiration here: https://github.com/filamentphp/filament/discussions/2058#discussioncomment-7537089 - you can look into the tenancy package as well.
3 replies
FFilament
Created by travlatra on 6/28/2024 in #❓┊help
php noob here - how should i create a crud page available to users
Create a second panel for your users (ie. Admin vs App panel).
3 replies
FFilament
Created by rnb_dev on 6/23/2024 in #❓┊help
Can I add verification system In multi tenant!
Two approaches; create a new model (ie. ShopRequest with the minimum required fields needed to create a shop) and create logic to view them as admin, maybe even edit them to make corrections and then create an actual shop from them (copying the fields). This approach is often used for creating new users (ie. user invites). Another approach is to create the actual shop with a flag (needs_approval boolean or approved_at datetime) and change all queries that resole shops to only include the ones that are approved (except for the admin, who would be able to see them and toggle approval).
3 replies
FFilament
Created by rnb_dev on 6/24/2024 in #❓┊help
In multi tenant how can I remove functionality that user can't create team!!
Read about policies and on your ShopPolicy make sure users are not allowed to create (but you as admin can). As far as I remember Filament respects this policy and the create new shop will disappear.
3 replies
FFilament
Created by Felix Schmid on 6/24/2024 in #❓┊help
Implement multi level tenancy
My admin panel is just for me. I can see/check all users/customer across all tenants, onboard new tenants, etc.
8 replies
FFilament
Created by Felix Schmid on 6/24/2024 in #❓┊help
Implement multi level tenancy
However, I did remove the email unique from the user model so someone can use the same email for creating an account for customers at different tenants. So the email needs to be unique per tenant per use type (as the tenant user could potentially be a user for a customer of his own or another tenant). This required some custom logic to basic validate for the different user types.
8 replies
FFilament
Created by Felix Schmid on 6/24/2024 in #❓┊help
Implement multi level tenancy
For the customer panel I also enabled multi tenancy, but for the customer model. Both tenant and customer model aren’t multi tenant in the sense that a user can only be attached to one.
8 replies
FFilament
Created by Felix Schmid on 6/24/2024 in #❓┊help
Implement multi level tenancy
8 replies
FFilament
Created by Felix Schmid on 6/24/2024 in #❓┊help
Implement multi level tenancy
I’m doing something similar for a new project. I use three panels though (admin, tenant, customer). Tenants can set a slug, which is used as a subdomain, and logo and color. This tenant panel is basically as described in the docs using multi tenancy. On the customer panel I created middleware that checks the slug (subdomain) to load the tenant and make it accessible throughout the rest of the process. For example to set the panel’s color, brand name or logo. On the user model I introduced a type (admin, tenant, customer) which basically functions as a layer on top of roles.
8 replies
FFilament
Created by Theford on 6/20/2024 in #❓┊help
How to Implement Multi-Tenancy with Admin View Option in FilamentPHP v3?
16 replies
FFilament
Created by Theford on 6/20/2024 in #❓┊help
How to Implement Multi-Tenancy with Admin View Option in FilamentPHP v3?
I’m in the same boat. I created a second panel, but I’m reusing the same resources. Based on the panel I tweak some stuff like showing an extra tenant name column or field. Is this bad practice?
16 replies
FFilament
Created by lordjackson on 6/22/2024 in #❓┊help
Custom page without upper menu and sidebar menu
8 replies
FFilament
Created by lordjackson on 6/22/2024 in #❓┊help
Custom page without upper menu and sidebar menu
8 replies
FFilament
Created by Wim on 3/26/2024 in #❓┊help
Multi-tenancy: don't show tenancy menu when individual user
Did you try using a closure in tenantMenu()?
2 replies
FFilament
Created by nurrehmet on 3/23/2024 in #❓┊help
Tailwind CSS not applied on custom pages
3 replies
FFilament
Created by Mocus on 3/22/2024 in #❓┊help
new to PHP and Filament, can backwards engineer the database i have?
You could take a look at https://github.com/reliese/laravel to kickstart your model generation. In the end you just have to do the dirty work as not everything can be guessed from your schema. Casting, guards, fillables, tricky relations, etc.
10 replies
FFilament
Created by MartinRaiola on 3/5/2024 in #❓┊help
Hide tenantID in URL
Did you add a slug column to your team table and set a slug for each team? Obviously you can use whatever column you like, doesn’t need to be called slug. All this does is make the route prettier, so show a short slug instead of an ugly uuid.
18 replies
FFilament
Created by MartinRaiola on 3/5/2024 in #❓┊help
Hide tenantID in URL
Sorry, copy/pasted the wrong url. Correct one is https://filamentphp.com/docs/3.x/panels/tenancy#configuring-the-slug-attribute - rest of my reply still stands. It’s possible, but up to you to code.
18 replies