mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Fix error on discussion page
This commit is contained in:
parent
a577910d04
commit
4494001ef7
|
@ -27,7 +27,7 @@ class Relationship implements ExtenderInterface
|
|||
|
||||
$parent::addRelationship($this->name, function ($model) {
|
||||
if ($this->type instanceof Closure) {
|
||||
return $this->type($model);
|
||||
return call_user_func($this->type, $model);
|
||||
} elseif ($this->type === 'belongsTo') {
|
||||
return $model->belongsTo($this->child, null, null, $this->name);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user