diff options
Diffstat (limited to 'api/Posts/Models')
-rw-r--r-- | api/Posts/Models/Post.php | 2 | ||||
-rw-r--r-- | api/Posts/Models/PostType.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/api/Posts/Models/Post.php b/api/Posts/Models/Post.php index 9da1401..b907808 100644 --- a/api/Posts/Models/Post.php +++ b/api/Posts/Models/Post.php @@ -26,7 +26,7 @@ class Post extends Model public function post_type() { - return $this->belongsTo('Api\Posts\Models\PostType'); + return $this->belongsTo('Api\Posts\Models\PostType', 'post_types_id', 'id'); } public function media_post() diff --git a/api/Posts/Models/PostType.php b/api/Posts/Models/PostType.php index 3547a0a..de8d0f3 100644 --- a/api/Posts/Models/PostType.php +++ b/api/Posts/Models/PostType.php @@ -14,6 +14,6 @@ class PostType extends Model public function posts() { - return $this->hasMany('Api\Posts\Models\Post'); + return $this->hasMany('Api\Posts\Models\Post', 'post_types_id', 'id'); } } |