From 4494001ef765be8edff64c2d67deb43497ac6fdb Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 18 May 2015 08:00:14 +0930 Subject: [PATCH] Fix error on discussion page --- src/Extend/Relationship.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extend/Relationship.php b/src/Extend/Relationship.php index 895901f42..de16a6724 100644 --- a/src/Extend/Relationship.php +++ b/src/Extend/Relationship.php @@ -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 {