Entity
class Entity extends Model implements Recyclable
Class Entity
Traits
Properties
| protected array | $fillable | The attributes that are mass assignable. |
|
| Currency | $currency | ||
| string | $name | ||
| bool | $multi_currency | ||
| int | $year_start | ||
| Carbon | $destroyed_at | ||
| Carbon | $deleted_at |
Methods
Entity's Reporting Currency.
Instance Identifier.
Model's Parent Entity (if exists).
Model's Daughter Entities (if any).
Users associated with the reporting Entity.
Entity's Registered Currencies.
Entity's Reporting Periods.
Entity attributes
Reporting Currency Default Rate.
Confirm the logged in User can work with the Entity. The EntityScope restricts every query to the User's Entity, so asking for another one would otherwise silently come back empty. Nobody being logged in, as on the console, is fine.
Current Reporting Period for the Entity.
Reporting Currency for the Entity.
Format the given amount and currency according to the given locale.
Validate Entity.
Details
in
Recycling at line 28
static void
bootRecycling()
Model recycling events.
in
Recycling at line 73
MorphMany
recycled()
Recycled Model records.
in
ModelTablePrefix at line 22
getTable()
Determine the model table name
at line 65
belongsTo
currency()
Entity's Reporting Currency.
at line 75
string
toString($type = false)
Instance Identifier.
at line 86
HasOne
parent()
Model's Parent Entity (if exists).
at line 96
HasOne
daughters()
Model's Daughter Entities (if any).
at line 106
HasMany
users()
Users associated with the reporting Entity.
at line 116
hasMany
currencies()
Entity's Registered Currencies.
at line 126
HasMany
reportingPeriods()
Entity's Reporting Periods.
at line 136
object
attributes()
Entity attributes
at line 146
ExchangeRate
getDefaultRateAttribute()
Reporting Currency Default Rate.
at line 179
void
assertAccessible()
Confirm the logged in User can work with the Entity. The EntityScope restricts every query to the User's Entity, so asking for another one would otherwise silently come back empty. Nobody being logged in, as on the console, is fine.
at line 191
ReportingPeriod
getCurrentReportingPeriodAttribute()
Current Reporting Period for the Entity.
at line 218
Currency
getReportingCurrencyAttribute()
Reporting Currency for the Entity.
at line 235
string
localizeAmount(float $amount, string|null $currencyCode = null, string $locale = null)
Format the given amount and currency according to the given locale.
at line 251
bool
save(array $options = [])
Validate Entity.