mirror of
https://repo.getmonero.org/AnonDev/xmrmemes.git
synced 2024-12-22 22:19:25 -05:00
821fb9b1ed
Update the payment code so everything is working now Improve DB structure Improve design Add API Validate XMR Address upon registration And Much More... Still Need to work on: - SEO - Dropdown in menu (bug, not dropping down)
30 lines
581 B
PHP
30 lines
581 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Tip extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $appends = ['amount_formatted', 'tx_url'];
|
|
|
|
public function getAmountFormattedAttribute()
|
|
{
|
|
return number_format(($this->amount)*(pow(10, -12)), 8, '.', '');
|
|
}
|
|
|
|
public function getTxUrlAttribute()
|
|
{
|
|
return config('app.xmr_explorer_base_url') . $this->txid;
|
|
}
|
|
|
|
public function address()
|
|
{
|
|
return $this->belongsTo(Address::class);
|
|
}
|
|
|
|
}
|