We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi ! 🖖
After using this plugin, I face a problem.
I need to import data and assign it to a belongsToMany relation, but on importing my xlsx file, only one row is processed:
belongsToMany
This is my xlsx file:
This is the form:
N° volontaire = volunteer_id
And for each row I need to attach it on my pivot table like so:
But on import he create same cohorts with only one volunteer in it:
This is the code I use:
protected function getActions(): array { return [ ImportAction::make() ->label('Importer une cohorte') ->fields([ TextInput::make('name') ->required() ->label('Nom de la cohorte'), TextInput::make('description') ->required() ->label('Description de la cohorte'), ImportField::make('volunteer_id') ->label('Colonne N° de volontaire'), ])->mutateAfterCreate(function (Model $model, $row) { $volunteer_id = $row['volunteer_id']; Volunteer::find($volunteer_id)->cohorts()->save($model); }), ]; }
Did I miss something in the doc ? Or it is a normal behavior ?
Thanks for reading,
Best regards !
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi ! 🖖
After using this plugin, I face a problem.
I need to import data and assign it to a
belongsToMany
relation, but on importing my xlsx file, only one row is processed:This is my xlsx file:
This is the form:
N° volontaire = volunteer_id
And for each row I need to attach it on my pivot table like so:
But on import he create same cohorts with only one volunteer in it:
This is the code I use:
Did I miss something in the doc ? Or it is a normal behavior ?
Thanks for reading,
Best regards !
The text was updated successfully, but these errors were encountered: