<?php

namespace Test\Models;

class Post
{
    public $fillable = [
        'title', 'body', 'author_id'
    ];
}
<?php

namespace Test\Models;

class Post
{
    public $fillable = [
        'title', 'body', 'author_id'
    ];

    public function author()
    {
        return $this->belongsTo('Test\Models\User');
    }
}
Add a author eloquent relation (to the users table).
Add a author eloquent relation (to the users table).
