lundi 2 septembre 2019

want to prevent multiple trigger of observer events in laravel

I have implemented observer to perform some action on saved events. IT is working fine. But the problem is this is event gets fired twice. I want to add some records in logs table on saved event callback, but because it is being fired twice records are also added twice. So this is creating duplication of records. Need to handle this in such a way that record gets inserted only once.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2LdG2AK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire