Closed giovanniledda closed 3 years ago
This condition:
$this !== $address->addressable()->first()
is always true so the function always returns false and the address is never deleted.
Changing this with:
$this != $address->addressable()->first()
...or with:
$this->id !== $address->addressable()->first()->id
works.
This condition:
$this !== $address->addressable()->first()
is always true so the function always returns false and the address is never deleted.
Changing this with:
$this != $address->addressable()->first()
...or with:
$this->id !== $address->addressable()->first()->id
works.