PK
œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/qpfajntr/ekhaya.265thami.com/y77.php on line 8
| Dir : /home/qpfajntr/wallet.265thami.com/application__b25eadc/app/Models/ |
| Server: Linux premium288.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64 IP: 162.254.39.137 |
| Dir : /home/qpfajntr/wallet.265thami.com/application__b25eadc/app/Models/Voucher.php |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\User;
class Voucher extends Model
{
protected $fillable = ['user_id','voucher_amount','voucher_code','json_data','created_at','updated_at','currency_id','currency_symbol','user_loader','is_loaded','voucher_fee','wallet_id','voucher_value'];
public function Transactions(){
return $this->morphMany('App\Models\Transaction', 'Transactionable');
}
public function User(){
return $this->belongsTo(User::class);
}
public function Loader(){
return $this->belongsTo(User::class, 'user_loader');
}
public function LoaderName(){
if ($this->Loader) {
return $this->Loader->name;
}
return 'NAN';
}
public function value(){
return $this->floattostr($this->voucher_value);
//return number_format((float)$this->voucher_value, 2, '.', ',') . ' '. $this->currency_symbol;
}
public function wasLoaded(){
if ($this->is_loaded) {
return 'Loaded';
}
return 'Unloaded';
}
private function floattostr( $val )
{
preg_match( "#^([\+\-]|)([0-9]*)(\.([0-9]*?)|)(0*)$#", trim($val), $o );
return $o[1].sprintf('%d',$o[2]).($o[3]!='.'?$o[3]:'');
}
}