My insertion is done through an external request. Create a controller to receive this information and then register. I want to use notification just to say that it has been registered.
[2024-08-02 18:16:19] local.INFO: Customer created successfully
[2024-08-02 18:16:19] local.ERROR: Filament\Notifications\Notification::sendToDatabase(): Argument #1 ($users) must be of type Illuminate\Database\Eloquent\Model|Illuminate\Contracts\Auth\Authenticatable|Illuminate\Support\Collection|array, null given, called in C:\me2\painel-agro-score\app\Observers\CustomerObserver.php on line 20 {"exception":"[object] (TypeError(code: 0): Filament\\Notifications\\Notification::sendToDatabase(): Argument #1 ($users) must be of type Illuminate\\Database\\Eloquent\\Model|Illuminate\\Contracts\\Auth\\Authenticatable|Illuminate\\Support\\Collection|array, null given, called in C:\\me2\\painel-agro-score\\app\\Observers\\CustomerObserver.php on line 20 at C:\\me2\\painel-agro-score\\vendor\\filament\\notifications\\src\\Notification.php:177)
[stacktrace]
#59 {main}"}
[2024-08-02 18:16:19] local.INFO: Customer created successfully
[2024-08-02 18:16:19] local.ERROR: Filament\Notifications\Notification::sendToDatabase(): Argument #1 ($users) must be of type Illuminate\Database\Eloquent\Model|Illuminate\Contracts\Auth\Authenticatable|Illuminate\Support\Collection|array, null given, called in C:\me2\painel-agro-score\app\Observers\CustomerObserver.php on line 20 {"exception":"[object] (TypeError(code: 0): Filament\\Notifications\\Notification::sendToDatabase(): Argument #1 ($users) must be of type Illuminate\\Database\\Eloquent\\Model|Illuminate\\Contracts\\Auth\\Authenticatable|Illuminate\\Support\\Collection|array, null given, called in C:\\me2\\painel-agro-score\\app\\Observers\\CustomerObserver.php on line 20 at C:\\me2\\painel-agro-score\\vendor\\filament\\notifications\\src\\Notification.php:177)
We can ignore the texts for now, I'm doing tests first.
When I make the deletion through the table action, the notification works.
However, when registration is done through the end-point, it is not displayed.