Exemplo n.º 1
0
 public function beforeDelete()
 {
     if ($this->id) {
         $wallets = Wallet::getList(['where' => ['currency_id', $this->id]]);
         foreach ($wallets as $wallet) {
             $wallet->delete();
         }
     }
 }