public function restore($payment) { if ($payment->invoice->is_deleted) { return false; } parent::restore($payment); }