Свойство | Тип | Описание | |
---|---|---|---|
$incrementing | boolean | Indicates if the IDs are auto-incrementing. |
Свойство | Тип | Описание | |
---|---|---|---|
$casts | array | ||
$guarded | |||
$hidden | array | Here we specify to hide lyrics as well to save some bandwidth (actually, lots of it). Lyrics can then be queried on demand. |
Метод | Описание | |
---|---|---|
album ( ) | ||
byPath ( string $path ) : |
Get a Song record using its path. | |
contributingArtist ( ) | ||
getArtistAttribute ( ) : |
Get the correct artist of the song. | |
getFavorites ( |
Get all songs favored by a user. | |
getLyricsAttribute ( $value ) : string | Prepare the lyrics for displaying. | |
getObjectStoragePublicUrl ( Aws\AwsClient $s3 = null ) : string | Get the song's Object Storage url for streaming or downloading. | |
getRelatedYouTubeVideos ( string $youTubePageToken = '' ) : object | false | Get the YouTube videos related to this song. | |
getS3ParamsAttribute ( ) : boolean | array | Get the bucket and key name of an S3 object. | |
getTitleAttribute ( $value ) : string | Some songs don't have a title. | |
isS3ObjectAttribute ( ) : boolean | Determine if the song is an AWS S3 Object. | |
playlists ( ) | ||
scopeInDirectory ( |
Scope a query to only include songs in a given directory. | |
scrobble ( string $timestamp ) : mixed | Scrobble the song using Last.fm service. | |
setTitleAttribute ( $value ) | Sometimes the tags extracted from getID3 are HTML entity encoded. | |
updateInfo ( array $ids, array $data ) : array | Update song info. | |
updateSingle ( string $title, string $albumName, string $artistName, string $lyrics, integer $track, integer $compilationState ) : self | Update a single song's info. |
public getArtistAttribute ( ) : |
||
Результат |
public static getFavorites ( |
||
$user | ||
$toArray | boolean | |
Результат | Illuminate\Database\Eloquent\Collection | array |
public getLyricsAttribute ( $value ) : string | ||
$value | ||
Результат | string |
public getObjectStoragePublicUrl ( Aws\AwsClient $s3 = null ) : string | ||
$s3 | Aws\AwsClient | |
Результат | string |
public getRelatedYouTubeVideos ( string $youTubePageToken = '' ) : object | false | ||
$youTubePageToken | string | The YouTube page token, for pagination purpose. |
Результат | object | false |
public getS3ParamsAttribute ( ) : boolean | array | ||
Результат | boolean | array |
public getTitleAttribute ( $value ) : string | ||
$value | ||
Результат | string |
public isS3ObjectAttribute ( ) : boolean | ||
Результат | boolean |
public scopeInDirectory ( |
||
$query | ||
$path | string | Full path of the directory |
Результат |
public setTitleAttribute ( $value ) | ||
$value |
public static updateInfo ( array $ids, array $data ) : array | ||
$ids | array | |
$data | array | The data array, with these supported fields: - title - artistName - albumName - lyrics All of these are optional, in which case the info will not be changed (except for lyrics, which will be emptied). |
Результат | array |
public bool $incrementing | ||
Результат | boolean |