mirror of
https://github.com/flarum/core.git
synced 2025-07-16 22:31:18 +02:00
Serializer ID
This commit is contained in:
@@ -10,6 +10,11 @@ class ExtensionSerializer extends AbstractSerializer
|
|||||||
{
|
{
|
||||||
protected $type = 'extensions';
|
protected $type = 'extensions';
|
||||||
|
|
||||||
|
public function getId($model)
|
||||||
|
{
|
||||||
|
return is_array($model) ? $model['id'] : $model->getId();
|
||||||
|
}
|
||||||
|
|
||||||
protected function getDefaultAttributes($model)
|
protected function getDefaultAttributes($model)
|
||||||
{
|
{
|
||||||
if (is_array($model)) {
|
if (is_array($model)) {
|
||||||
|
Reference in New Issue
Block a user