public function deleted(InventoryStock $stock)
    {
        $movements = $stock->movements()->get();

        if (count($movements) > 0) {
            foreach ($movements as $movement) {
                $movement->delete();
            }
        }
    }
public function deleted(InventoryStock $stock)
    {
        $movements = $stock->movements()->get();

        if (count($movements) > 0) {
            foreach ($movements as $movement) {
                $movement->delete();
            }
        }
    }
public function deleted ( InventoryStock $ stock ) { $ movements = $ stock -> movements ( ) -> get ( ) ; if ( count ( $ movements ) > 0 ) { foreach ( $ movements as $ movement ) { $ movement -> delete ( ) ; } } }
Captures the Inventory Stock models deleted event
and cascades the delete to all of it's movements.

@param InventoryStock $stock
Captures the Inventory Stock models deleted event and cascades the delete to all of it s movements .