Alan
Alan
FFilament
Created by Alan on 10/8/2024 in #❓┊help
Edit when dependent drop down shows all values.
On edit when i change the product name the values in drop down has all values irrespective of manufacture until i change manufacture.How to sort this if ($name === AllAttrib::ATTR_NAME_MANUFACTURER) { $component = Select::make("itemAttrib.$attribId.value") ->label(__($name)) ->options($taskAttrib['value'] ?? []) ->reactive() ->preload() ->live() ->afterStateUpdated(function (callable $get, callable $set) use ($attribId) { $manufacturerId = $get("itemAttrib.$attribId.value"); $set("itemAttrib.product.value", null); // Fetch product options based on selected manufacturer $productOptions = AttribValue::where('parent_id', $manufacturerId) ->orderBy('value') ->pluck('value', 'id') ->toArray(); $set('productOptions', $productOptions); }) ->default($value); } elseif ($name === AllAttrib::ATTR_NAME_PRODUCT_NAME) { $component = Select::make("itemAttrib.$attribId.value") ->label(__($name)) ->options(fn($get) => AttribValue::pluck('value', 'id')->toArray()) // Show all product options ->reactive() ->live() ->preload() ->default($value); } else { $component = Select::make("itemAttrib.$attribId.value") ->label(__($name)) ->options($taskAttrib['value'] ?? []) ->default($value); }
5 replies
FFilament
Created by Alan on 9/26/2024 in #❓┊help
Filament shield plugin not working?
I am using Filament Shield. While resources are correctly marked as forbidden based on permissions, How can I handle authorization for resources that share the same model name.Example my user resource and customer resource users user model when i restrict user resource for one role , i lose both the resources .
2 replies
FFilament
Created by Alan on 9/24/2024 in #❓┊help
Issue while implementing solution-forest/filament-access-management
No description
6 replies
FFilament
Created by Alan on 9/24/2024 in #❓┊help
Using shield plugin but roles and permission page not found
I recently completed my project without the shield plugin. Now, I want to add roles and permissions. I've followed the documentation, but the roles pages aren't appearing for my super admin user.
18 replies
FFilament
Created by Alan on 9/6/2024 in #❓┊help
Header avatar image change in filament
No description
3 replies