Fix route in net worth and expand user group API

This commit is contained in:
James Cole
2023-09-20 19:05:06 +02:00
parent 38b7daf3b6
commit c3bc1af7b5
6 changed files with 198 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Carbon;
/**
@@ -66,6 +67,8 @@ use Illuminate\Support\Carbon;
*/
class CurrencyExchangeRate extends Model
{
use SoftDeletes;
/** @var array Convert these fields to other data types */
protected $casts
= [
@@ -108,7 +111,7 @@ class CurrencyExchangeRate extends Model
protected function rate(): Attribute
{
return Attribute::make(
get: fn ($value) => (string)$value,
get: fn($value) => (string)$value,
);
}
@@ -118,7 +121,7 @@ class CurrencyExchangeRate extends Model
protected function userRate(): Attribute
{
return Attribute::make(
get: fn ($value) => (string)$value,
get: fn($value) => (string)$value,
);
}
}