Notifying the user after dispatching a background job once creating a new entry.
Right now im tackling it from the model's pov .. in Brief.php i have this part of code -
The job itself is doing bunch of things and eventually creates a new Article entry.. How can i notify the user in filament that their job is done? (Right now im using database driver for my jobs)
6 Replies
didn't work for me for some reason ..
no errors whatsoever, but no notfications as well
php artisan queue:work
?already runs..
i'll keep on trying.
shouldn't i pro-actively do some
$user->notify(...)
thingy?oh! thanks!
btw, @Leandro Ferreira , a bit unrelated, but maybe u can help as well -
on the
created
function from before - is there an option to retrieve the relationship too? i guess those are created after the model itself is created, but changing the event to saved
didn't help me neither loading the relationship actively ($brief->load('sections')
) .. The Brief
model has a hasMany relationship with the Section
model and im creating it with a filament repeater -
But then, on the model's created
(or saved
) event(s) i get an empty array when trying to access $brief->sections
.. for example (using saved
method along with the attempt to load the relationship actively) -
I guess its more laravel-related, but just making sure its not something i'm missing the filament way
well, never mind, i solved it via filament's afterCreate()
method