Laravel this is not only a practical framework, it is also a programming style
samedi 30 septembre 2017
Laravel eloquent updateOrCreate(), do something only if create?
I use in my laravel 5.5 app Model::updateOrCreate(), it works, but by 1 parameter I wish to do something only if entry is creating and not updating model, is this possible?
I was able to get around this by getting the ID of the last entry prior to the updateOrCreate. After, if the ID was higher, I did the secondary action.
I was able to get around this by getting the ID of the last entry prior to the updateOrCreate. After, if the ID was higher, I did the secondary action.
RépondreSupprimer