import job failing continuously
I am using the database as my queue_driver (connection).
as you can see in the screenshot the job is continiously failing, I haven't overriden the code for the Import job and this is all the code that I have written
as you can see in the screenshot the job is continiously failing, I haven't overriden the code for the Import job and this is all the code that I have written
class UserImporter extends Importer
{
protected static ?string $model = User::class;
public static function getColumns(): array
{
return [
ImportColumn::make('first_name')
->requiredMapping()
->guess(['prenom'])
->rules(['required', 'max:255']),
ImportColumn::make('last_name')
->requiredMapping()
->guess(['nom'])
->rules(['required', 'max:255']),
ImportColumn::make('cin')
->label('CIN')
->requiredMapping()
->rules(['required', 'numeric', 'digits:8']),
ImportColumn::make('email')
->requiredMapping()
->rules(['email_address']),
ImportColumn::make('password')
->requiredMapping()
->guess(['mot de passe', 'pass'])
->rules(['required']),
ImportColumn::make('gsm')
->label('GSM')
->requiredMapping()
->guess(['tel', 'phone', 'gsm'])
->rules(['required', 'numeric', 'digits:8']),
];
}
// the rest is the same as the default importer code...class UserImporter extends Importer
{
protected static ?string $model = User::class;
public static function getColumns(): array
{
return [
ImportColumn::make('first_name')
->requiredMapping()
->guess(['prenom'])
->rules(['required', 'max:255']),
ImportColumn::make('last_name')
->requiredMapping()
->guess(['nom'])
->rules(['required', 'max:255']),
ImportColumn::make('cin')
->label('CIN')
->requiredMapping()
->rules(['required', 'numeric', 'digits:8']),
ImportColumn::make('email')
->requiredMapping()
->rules(['email_address']),
ImportColumn::make('password')
->requiredMapping()
->guess(['mot de passe', 'pass'])
->rules(['required']),
ImportColumn::make('gsm')
->label('GSM')
->requiredMapping()
->guess(['tel', 'phone', 'gsm'])
->rules(['required', 'numeric', 'digits:8']),
];
}
// the rest is the same as the default importer code...