charleswilfriedk
Notification send before observer creating function is executed
Notification::make()
->success()
->icon('heroicon-m-link')
->title(('filament-resources.notification.rental.update-car-driver.title'))
->body(('filament-resources.notification.rental.update-car-driver.success', ['rental' => $record->rental_number]))
->send()
->sendToDatabase(User::getNotifiableFor(RentalPermissions::NOTIFIED_UPDATED->value), isEventDispatched: true);
25 replies
Notification send before observer creating function is executed
public function creating(Rental $rental): void
{
....
$rental->rental_number = 'NKH-' . now()->format('Y') . mb_str_pad((string) $rental->order, 5, '0', STR_PAD_LEFT);
}
25 replies