mirror of
https://repo.getmonero.org/AnonDev/xmrmemes.git
synced 2024-12-22 14:15:08 -05:00
25 lines
452 B
PHP
25 lines
452 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'];
|
|
|
|
public function getAmountFormattedAttribute()
|
|
{
|
|
return number_format(($this->amount)*(pow(10, -12)), 8, '.', '');
|
|
}
|
|
|
|
public function address()
|
|
{
|
|
return $this->belongsTo(Address::class);
|
|
}
|
|
|
|
}
|