<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * @property integer $id
 * @property integer $author_id
 * @property string $title
 * @property string $content
 * @property User $user
 */
class Post extends Model
{
    /**
     * @var array
     */
    protected $fillable = ['author_id', 'title', 'content'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo('App\Models\User', 'author_id');
    }
}
