Geoff.
Geoff.
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Hello all I am using this plugin https://github.com/outer-web/filament-translatable-fields and when I want to write a test now I am getting the error that translatable does not exist. How to add the plugin also in the test environment? Here is the error: Illuminate\View\ViewException: Method Filament\Forms\Components\TextInput::translatable does not exist. Here is the test:
it('can validate form', function () {
$rules = [
'description' => ['required', 'max:255'],
'code' => ['required', 'max:6'],
'type' => ['required',Rule::enum(FoodBeverage::class)],
'vat_id' => ['required', 'exists:vat_codes,id'],
];
livewire(CreateProductGroup::class)
->fillForm([
'description' => '',
'code' => '',
])
->call('create')
->assertHasFormErrors($rules);
});
it('can validate form', function () {
$rules = [
'description' => ['required', 'max:255'],
'code' => ['required', 'max:6'],
'type' => ['required',Rule::enum(FoodBeverage::class)],
'vat_id' => ['required', 'exists:vat_codes,id'],
];
livewire(CreateProductGroup::class)
->fillForm([
'description' => '',
'code' => '',
])
->call('create')
->assertHasFormErrors($rules);
});
45 replies
FFilament
Created by Geoff. on 11/8/2023 in #❓┊help
Use a collection instead of a relation in the relationmanager
hello, is it possible to use a collection as a relation in the getRelations together with a relation manager?
2 replies
FFilament
Created by Geoff. on 10/27/2023 in #❓┊help
multitenacy combined with tenancyforlaravel and filament shield permission problem
Hello all, I have a a problem with the permissions of filament shield. When i run the shield:generate on the admin app all is working for the admin. But then when I run the shield:generate for the tenant (different database) with tenants:run … the permissions are ok for the tenant but not anymore for the admin. I think it has something todo with the caching of the permissions. So two quesions: Is there a way to disable the caching of the permission for testing purpose? Is there a way to cache the permissions for a panel? I hope someone knows the answer 😬 Thanks already
14 replies