Album
extends BaseModel
in package
implements
HasMedia
uses
HasNanoPublicId, HasFactory, HasLibraryAccess, Versionable, InteractsWithMedia
Table of Contents
Interfaces
- HasMedia
Properties
- $advancedFilters : array<string|int, mixed>
- $filterFields : array<string|int, mixed>
- $filterRelations : array<string|int, mixed>
- $dateFormat : mixed
- $fillable : mixed
- $perPage : mixed
- $versionable : mixed
Methods
- artists() : mixed
- bootHasNanoPublicId() : mixed
- cover() : MorphOne
- createUnknown() : static
- Create an unknown album with localized title
- formatForException() : string
- getRouteKey() : mixed
- getRouteKeyName() : string
- getTitleAttribute() : mixed
- isUnknown() : bool
- Check if this album is marked as unknown
- library() : mixed
- newEloquentBuilder() : mixed
- registerMediaConversions() : void
- shouldSkipMetadataLookup() : bool
- Check if metadata lookup should be skipped for this album
- songs() : mixed
- update() : mixed
- userHasAccessToLibrary() : bool
- Determine if a user has access to the library.
- casts() : array<string|int, mixed>
- scopeWhereGenreNames() : mixed
Properties
$advancedFilters
public
static array<string|int, mixed>
$advancedFilters
= ['genres']
$filterFields
public
static array<string|int, mixed>
$filterFields
= ['title', 'slug', 'year', 'directory']
$filterRelations
public
static array<string|int, mixed>
$filterRelations
= ['artists', 'cover', 'library', 'songs', 'songs.genres']
$dateFormat
protected
mixed
$dateFormat
= 'Y-m-d H:i:sO'
$fillable
protected
mixed
$fillable
= ['public_id', 'library_id', 'title', 'type', 'mbid', 'discogs_id', 'spotify_id', 'year', 'label', 'catalog_number', 'barcode', 'country', 'language', 'disambiguation', 'annotation']
$perPage
protected
mixed
$perPage
= 60
$versionable
protected
mixed
$versionable
= ['public_id', 'library_id', 'title', 'type', 'mbid', 'discogs_id', 'spotify_id', 'year', 'label', 'catalog_number', 'barcode', 'country', 'language', 'disambiguation', 'annotation']
Methods
artists()
public
artists() : mixed
bootHasNanoPublicId()
public
static bootHasNanoPublicId() : mixed
cover()
public
cover() : MorphOne
Return values
MorphOnecreateUnknown()
Create an unknown album with localized title
public
static createUnknown([array<string|int, mixed> $attributes = [] ]) : static
Parameters
- $attributes : array<string|int, mixed> = []
Return values
staticformatForException()
public
formatForException() : string
Return values
stringgetRouteKey()
public
getRouteKey() : mixed
getRouteKeyName()
public
getRouteKeyName() : string
Return values
stringgetTitleAttribute()
public
getTitleAttribute() : mixed
isUnknown()
Check if this album is marked as unknown
public
isUnknown() : bool
Return values
boollibrary()
public
library() : mixed
newEloquentBuilder()
public
newEloquentBuilder(mixed $query) : mixed
Parameters
- $query : mixed
registerMediaConversions()
public
registerMediaConversions([Media|null $media = null ]) : void
Parameters
- $media : Media|null = null
shouldSkipMetadataLookup()
Check if metadata lookup should be skipped for this album
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> = []
userHasAccessToLibrary()
Determine if a user has access to the library.
public
userHasAccessToLibrary(int $userId, int $libraryId) : bool
Parameters
- $userId : int
- $libraryId : int
Return values
boolcasts()
protected
casts() : array<string|int, mixed>
Return values
array<string|int, mixed>scopeWhereGenreNames()
protected
scopeWhereGenreNames(BaseBuilder $q, array<string|int, mixed>|string $names) : mixed
Parameters
- $q : BaseBuilder
- $names : array<string|int, mixed>|string