Artist
extends BaseModel
in package
uses
HasFactory, HasNanoPublicId
Table of Contents
Properties
- $filterFields : array<string|int, mixed>
- $filterRelations : array<string|int, mixed>
- $casts : mixed
- $dateFormat : mixed
- $fillable : mixed
Methods
- albums() : mixed
- bootHasNanoPublicId() : mixed
- createUnknown() : static
- Create an unknown artist with localized name
- formatForException() : string
- getNameAttribute() : mixed
- getRouteKeyName() : string
- hasEnded() : bool
- Check if this artist has ended (died/disbanded)
- isActive() : bool
- Check if this artist is still active
- isUnknown() : bool
- Check if this artist is marked as unknown
- newEloquentBuilder() : mixed
- portrait() : mixed
- scopeActive() : Builder
- Scope to get active artists
- scopeEnded() : Builder
- Scope to get artists that have ended
- scopeOfType() : Builder
- Scope to get artists by type
- shouldSkipMetadataLookup() : bool
- Check if metadata lookup should be skipped for this artist
- songs() : mixed
- update() : mixed
Properties
$filterFields
public
static array<string|int, mixed>
$filterFields
= ['name', 'slug']
$filterRelations
public
static array<string|int, mixed>
$filterRelations
= ['songs']
$casts
protected
mixed
$casts
= ['life_span_begin' => 'date', 'life_span_end' => 'date']
$dateFormat
protected
mixed
$dateFormat
= 'Y-m-d H:i:sO'
$fillable
protected
mixed
$fillable
= ['public_id', 'name', 'country', 'gender', 'type', 'life_span_begin', 'life_span_end', 'disambiguation', 'sort_name', 'mbid', 'discogs_id', 'spotify_id']
Methods
albums()
public
albums() : mixed
bootHasNanoPublicId()
public
static bootHasNanoPublicId() : mixed
createUnknown()
Create an unknown artist with localized name
public
static createUnknown([array<string|int, mixed> $attributes = [] ]) : static
Parameters
- $attributes : array<string|int, mixed> = []
Return values
staticformatForException()
public
formatForException() : string
Return values
stringgetNameAttribute()
public
getNameAttribute() : mixed
getRouteKeyName()
public
getRouteKeyName() : string
Return values
stringhasEnded()
Check if this artist has ended (died/disbanded)
public
hasEnded() : bool
Return values
boolisActive()
Check if this artist is still active
public
isActive() : bool
Return values
boolisUnknown()
Check if this artist is marked as unknown
public
isUnknown() : bool
Return values
boolnewEloquentBuilder()
public
newEloquentBuilder(mixed $query) : mixed
Parameters
- $query : mixed
portrait()
public
portrait() : mixed
scopeActive()
Scope to get active artists
public
scopeActive(Builder $query) : Builder
Parameters
- $query : Builder
Return values
BuilderscopeEnded()
Scope to get artists that have ended
public
scopeEnded(Builder $query) : Builder
Parameters
- $query : Builder
Return values
BuilderscopeOfType()
Scope to get artists by type
public
scopeOfType(Builder $query, string $type) : Builder
Parameters
- $query : Builder
- $type : string
Return values
BuildershouldSkipMetadataLookup()
Check if metadata lookup should be skipped for this artist
public
shouldSkipMetadataLookup() : bool
Return values
boolsongs()
public
songs() : mixed
update()
public
update([array<string|int, mixed> $attributes = [] ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $attributes : array<string|int, mixed> = []
- $options : array<string|int, mixed> = []