Property | Type | Description | |
---|---|---|---|
$casts | |||
$guarded | array | The attributes that are protected from mass assign. | |
$hidden | array | The attributes excluded from the model's JSON form. | |
$hiddenPreferences | array | The preferences that we don't want to show to the client. | |
$table | string | The database table used by the model. |
Method | Description | |
---|---|---|
connectedToLastfm ( ) : boolean | Determine if the user is connected to Last.fm. | |
deletePreference ( string $key ) | Delete a preference. | |
getLastfmSessionKeyAttribute ( ) : string | null | Get the user's Last.fm session key. | |
getPreference ( string $key ) : string | null | Get a preference item of the current user. | |
getPreferencesAttribute ( string $value ) : array | Unserialize the user preferences back to an array before returning. | |
interactions ( ) | ||
playlists ( ) | ||
savePreference ( string $key, string $val ) | Save a user preference. | |
setPreference ( $key, $val ) | An alias to savePreference(). | |
setPreferencesAttribute ( array $value ) | User preferences are stored as a serialized associative array. |
public connectedToLastfm ( ) : boolean | ||
return | boolean |
public deletePreference ( string $key ) | ||
$key | string |
public getLastfmSessionKeyAttribute ( ) : string | null | ||
return | string | null | The key if found, or null if user isn't connected to Last.fm |
public getPreferencesAttribute ( string $value ) : array | ||
$value | string | |
return | array |
public savePreference ( string $key, string $val ) | ||
$key | string | |
$val | string |
public setPreference ( $key, $val ) | ||
$key | ||
$val |
public setPreferencesAttribute ( array $value ) | ||
$value | array |
protected array $guarded | ||
return | array |
protected string $table | ||
return | string |