Fix error on discussion page

This commit is contained in:
Toby Zerner 2015-05-18 08:00:14 +09:30
parent 2be90d1caf
commit 15658a7cbf

View File

@ -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 {