Vitor
Custom page before list resource
I need to add a custom page before listing a resource. I tried something like this:
I want a page to select a factory and, after a factory is selected, list the products where the factory matches the selected one.
What is the best approach to this?
13 replies
Create a Team permissions with Shield
Hello guys!
I'm using Filament 3 with Filament Shield and need to assign some models in teams for default permissions, like:
I have a created user and this user in inside the Factory team.
The factory team, by default, has permission to show all products and all sales.
Has a way to do this?
5 replies
(HELP) Multi permissions
Hello,
Im developing a new system based in:
Factories, Stores and a master admin.
Factories can have multiple users;
Stores can have multiple users;
Admin can access all the resources.
Basically, the factory can only access products and sales resources, but can i have a user relationed with the factory only with the product resource permission, and another with the sales only.
Then, ill has a main permission in the factory and sub-permissions in the relationed users.
Has a easy/practice way to implement this?
Sorry if it was a little confusing
2 replies
Get current model inside relationManager
Has a way to get the current model inside a RelationManager?
My use case:
I have a UserResource with a separate class called UserForm (with the form method to reuse);
A AnotherResource with UserRelationManager, and inside the manager im using the same UserForm;
A password field with
->visible(fn ($livewire) => $livewire instanceof CreateUser)
, but this dont works in a RelationManager.5 replies
Panels with some identical resources
Hello,
I have a application with 3 different panels (admin, factory and storekeeper).
Basically:
Admin panel can access with the guard user and role admin;
Factory panel can acess with guard factory;
Storekeeper panel can acess with guard shop;
The admin can access all the resources;
The factory can access just products and sales resources, and there must be logic to search only for products related to the factory logged in.
Storekeeper mantain the factory logic, acessing just the sales and products related to the storekeeper logged in.
What would be the correct way to block these resources depending on the panel? Is there any way to have a variable in the resource (like $factoryCanAcess: bool), and inside each panel in discoverResources i check for the variable?
6 replies
Custom resources directories
Has a way to create resources in custom folders?
Im using a modular architeture, for example, i have 3 different models:
base_path/modules/User
,
base_path/modules/Factory
,
base_path/modules/Car
,
And inside each module, i have a folder called filament/resources
, and inside each resources i have the respective Resource.
Is there any way to go through all the module folders and “attach” the resources?
In filament v2, this provider this provider was working:
39 replies