From 4736541e1956a736d9ea902e46f6a6a0d3a37c8a Mon Sep 17 00:00:00 2001 From: CupOfTea696 Date: Wed, 10 Jun 2015 14:25:25 +0200 Subject: [PATCH] RefreshToken fix --- src/Models/RefreshToken.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/RefreshToken.php b/src/Models/RefreshToken.php index b9e87c3..f5bc8be 100644 --- a/src/Models/RefreshToken.php +++ b/src/Models/RefreshToken.php @@ -16,12 +16,12 @@ public function __construct(array $attributes = []){ $this->userKey = (new $model)->getKeyName(); $this->table = Config::get('youtube.table'); - $this->fillable = ['token', $this->userKey]; + $this->fillable = ['token', 'user_id']; parent::__construct($attributes); } public function user(){ - return $this->hasOne(('\\' . Config::get('auth.model')), $this->userKey, 'user_id'); + return $this->belongsTo(('\\' . Config::get('auth.model')), $this->userKey, 'user_id'); } }