mirror of
https://github.com/flarum/framework.git
synced 2025-03-11 12:51:26 +08:00
Serializer ID
This commit is contained in:
parent
3d6a467de9
commit
ffaa88f526
@ -10,6 +10,11 @@ class ExtensionSerializer extends AbstractSerializer
|
||||
{
|
||||
protected $type = 'extensions';
|
||||
|
||||
public function getId($model)
|
||||
{
|
||||
return is_array($model) ? $model['id'] : $model->getId();
|
||||
}
|
||||
|
||||
protected function getDefaultAttributes($model)
|
||||
{
|
||||
if (is_array($model)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user