Fonz
Import: Column not found: 1054 Unknown column 'grade' in 'field list'
Hi,
I have an import action in a relationship manager, with the following fields:
Then in resolveRecord(), I check if the record exists (firstOrCreate) and attach to its parent. The value from grade should be saved in the pivot table.
If I import name and birthday only, everything works as expected. But as soon as I add grade, I get the following error:
The script tries to add the grade to the participant table when creating a new participant, which does not exist. How to tell it to ignore "grade" when creating a new participant?
I tried setting 'birthday' a second parameter, in hope it would then only consider name and birthday. But it does not.
Is this even the right way to handle this import action?
Thanks
4 replies
404 on admin/new (Filament\Pages\Tenancy\RegisterTenant)
Hi, I am using multi-tenancy and have created a tenant registration page as described in the docs.
CreatePlateform.php
AdminPanelProvider.php
route:list
If I click on "Create new plateform" in the menu, I get a "404 | Not found" error.
Could it be a permission problem? I am using althinect/filament-spatie-roles-permissions. But wouldn't this throw a 403 error? I have a "Super Admin" role, but they are attachted to the exiting tenants (one role per tenant).
Thank you
4 replies
Custom column to display a pivot of the current user and tenancy relationship
I would like to display a boolean column of the users and the currenty tenant relation in a table and I am a bit lost. Can someone point me to the right direction? Thanks
5 replies
Custom validation rules
I am currently using a custom validation rule on a form. I would like to use the same rule in filament, but I do not know how.
This is the rule:
$request->validate([
"onlineRegistration" => [new OneOf($request, ["onlineRegistration","registrationLink","registrationEmail"])],
"registrationLink" => [new OneOf($request, ["onlineRegistration","registrationLink","registrationEmail"])],
"registrationEmail" => [new OneOf($request, ["onlineRegistration","registrationLink","registrationEmail"])],
]);
In filament, I tried this:
Toggle::make('onlineRegistration')->rules([new OneOf(request(), ["onlineRegistration","registrationLink","registrationEmail"])]),
But it always shows a validation error9 replies