mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 13:07:59 +01:00
31 lines
523 B
PHP
31 lines
523 B
PHP
|
<?php
|
||
|
|
||
|
namespace Poniverse\Ponyfm\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class AlexaSession extends Model
|
||
|
{
|
||
|
public $incrementing = false;
|
||
|
|
||
|
protected $table = 'alexa_session';
|
||
|
|
||
|
protected $casts = [
|
||
|
'payload' => 'array'
|
||
|
];
|
||
|
|
||
|
public function put($key, $value)
|
||
|
{
|
||
|
$payload = $this->payload;
|
||
|
|
||
|
$payload[$key] = $value;
|
||
|
|
||
|
$this->payload = $payload;
|
||
|
}
|
||
|
|
||
|
public function get($key, $default = null)
|
||
|
{
|
||
|
return $this->payload[$key] ?? $default;
|
||
|
}
|
||
|
}
|