mercredi 30 janvier 2019

Laravel observer Update Event in not Triggering

i am trying to update my remaining_quantity by decreasing the checked_out_quantity from the initial Quantity like this but its not working

public function updating(Consumable $consumable)
{
    $consumable->remaining_qty = $consumable->quantity - $consumable->checked_out_qty;
    $consumable->save();     
}   

anybody know how i can get it to trigger?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire