Melomancheto
Upload image/video to server right after it's been added as temp file
Hello everyone, I'm trying to find the right event to hook into that would help me to store the image right after it's been validated.
I'm looking for something like
afterValidation()
I guess.
I have the following component
What would the best event to replace afterStateHydrated()
here?2 replies
Multi-tenancy for models with no direct relation to user
If I understand the multi-tenancy I always need to pass the organization relation, since this is what my tenancy is referring to.
Sadly at some models I don't have direct relation to the user or the user is a Many to Many or One to Many relation so that I can get to the organization. I get the following error.
I already have set the tenant for the panel by using
->tenant(Organization::class, slugAttribute: 'slug')
.
I can change the Ownership of the Relationship Name
for example
protected static ?string $tenantOwnershipRelationshipName = 'users';
as per Resource but since I'm going from the Media -> Game -> User -> Organization this looks very complicated tbh.
I've added the following code in Models/Media.php
order to display something.
If I remove it I get the error from below. The error itself is very self explanatory but I still feel like I'm not doing something right.
If I understand correctly I need to go in every model and define the so called organization
relationship and from there fetch the right organization going trough the user?9 replies
Define a custom route with custom view in Filament
I would like to define a custom logic that will be executed after the user logs in.
The idea is to show a similar design to the login page after the user logins. It will contain a dropdown menu and a submit button.
The problem is that I'm unable to define the custom route anywhere. Can you please guide me where should I put such behaviour?
10 replies