I don't see where the importAction error file is.

What I am trying to do: I made an ImportAction for users. It works well.

What I did: I insert existing error to check what what it should result. I receive proper notifications on screen (coded by me)

My issue: I do not receive any message to where to find the error log. And why I see a message that my batch is on queue while it is already been done. How to change the message? What am I missing?

My code:

class UserImporter extends Importer
{
    protected static ?string $model = User::class;

    public static function getColumns(): array
    {
        return [
          
            [...]
            
        ];
    }

    protected function beforeSave(): void
    {
        [...]
    }

    protected function afterSave(): void
    {
        [...]
        Notification::make()
            ->title(__('filament.invitation_transmitted') . $user->first_name . ' ' . $user->last_name . '.')
            ->success()
            ->duration(10000)
            ->send();
    }

    public function resolveRecord(): ?User
    {
        $user = User::query()
            ->where('email', $this->data['email'])
            ->first();

        if ($user) {
            Notification::make()
                ->title($user->email . __('filament.already_registered'))
                ->success()
                ->duration(10000)
                ->send();
            throw new RowImportFailedException(__('filament.already_registred') . "[{$this->data['email']}].");
        }

        return new User();
    }

    public static function getCompletedNotificationBody(Import $import): string
    {
        [...]

        return $body;
    }
}
Was this page helpful?