Toasts fired in an AssetUploaded
event listener using the facade are not displaying
#10626
Labels
AssetUploaded
event listener using the facade are not displaying
#10626
Bug description
The documentation states I should be able to fire Toast notifications from the server using the Toast facade.
Based on when an asset is uploaded, I want to create an entry in a specific collection. This entry should have a "sanitized" version of the asset title.
So I listen to the AssetUploaded event, and if it is fired for a specific asset container I get to work creating an entry.
However, we will not be listening for AssetDeleted events, so in my event listener, I check if an entry with that specific "sanitized" name already exists.
If that happens, I DO NOT want to cancel uploading of the asset, instead, I want to show a Toast notification to the user, giving them some info that the entry was not automatically created.
So I followed the documentation and utilized the code below to show a Toast notification. However, except for the
X Asset uploaded
toast, nothing displays.So my questions are:
AssetCreated
orAssetSaved
or something?I'll post the full handle method of the listener below.
How to reproduce
Minimal steps would be as follows:
AssetUploaded
event.Code for it could look as follows:
Logs
No response
Environment
Installation
Existing Laravel app
Additional details
No response
The text was updated successfully, but these errors were encountered: