Relative Content

Tag Archive for sqllaravel

Counting items by statuses and changing counter on update

I am building a laravel website where I need to show how many items a courier has delivered, failed and in progress. I made a counter using Observer, but I don’t know how to get the previous status of the item in the update of the Observer and can’t decrement the value. How should it be done?