public function deposit($amount, $type = 'deposit', $meta = [], $accepted = true)
    {
        if ($accepted) {
            $this->wallet->balance += $amount;
            $this->wallet->save();
        } elseif (! $this->wallet->exists) {
            $this->wallet->save();
        }

        $this->wallet->transactions()
            ->create([
                'amount' => $amount,
                'hash' => uniqid('lwch_'),
                'type' => $type,
                'accepted' => $accepted,
                'meta' => $meta
            ]);
    }
public function deposit($amount, $type = 'deposit', $meta = [], $accepted = true)
    {
        if ($accepted) {
            $this->wallet->balance += $amount;
            $this->wallet->save();
        } elseif (! $this->wallet->exists) {
            $this->wallet->save();
        }

        $this->wallet->transactions()
            ->create([
                'amount' => $amount,
                'hash' => uniqid('lwch_'),
                'type' => $type,
                'accepted' => $accepted,
                'meta' => $meta
            ]);
    }
public function deposit ( $ amount , $ type = 'deposit' , $ meta = [ ] , $ accepted = true ) { if ( $ accepted ) { $ this -> wallet -> balance += $ amount ; $ this -> wallet -> save ( ) ; } elseif ( ! $ this -> wallet -> exists ) { $ this -> wallet -> save ( ) ; } $ this -> wallet -> transactions ( ) -> create ( [ 'amount' => $ amount , 'hash' => uniqid ( 'lwch_' ) , 'type' => $ type , 'accepted' => $ accepted , 'meta' => $ meta ] ) ; }
Move credits to this account
@param  integer $amount
@param  string  $type
@param  array   $meta
Move credits to this account