mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 06:27:59 +01:00
30 lines
523 B
PHP
30 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;
|
|
}
|
|
}
|