29 lines
659 B
PHP
29 lines
659 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
|
use Illuminate\Database\Eloquent\Concerns\HasUlids;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Efectivo extends Model
|
|
{
|
|
use HasUlids;
|
|
|
|
protected $table = 'efectivos';
|
|
|
|
public function getTotal(): Attribute {
|
|
return Attribute::get(function () {
|
|
return $this->veinte_mil
|
|
+ $this->diez_mil
|
|
+ $this->cinco_mil
|
|
+ $this->dos_mil
|
|
+ $this->mil
|
|
+ $this->quinientos
|
|
+ $this->cien
|
|
+ $this->cincuenta
|
|
+ $this->diez;
|
|
});
|
|
}
|
|
}
|