mirror of
https://github.com/flarum/core.git
synced 2025-07-04 08:33:08 +02:00
28 lines
567 B
PHP
Executable File
28 lines
567 B
PHP
Executable File
<?php namespace Flarum\Core\Models;
|
|
|
|
abstract class EventPost extends Post implements MergeableInterface
|
|
{
|
|
use MergeableTrait;
|
|
|
|
/**
|
|
* Unserialize the content attribute.
|
|
*
|
|
* @param string $value
|
|
* @return string
|
|
*/
|
|
public function getContentAttribute($value)
|
|
{
|
|
return json_decode($value, true);
|
|
}
|
|
|
|
/**
|
|
* Serialize the content attribute.
|
|
*
|
|
* @param string $value
|
|
*/
|
|
public function setContentAttribute($value)
|
|
{
|
|
$this->attributes['content'] = json_encode($value);
|
|
}
|
|
}
|