laravel-learn-bbs/app/Models/Reply.php

32 lines
529 B
PHP
Raw Normal View History

2018-01-15 15:24:11 +00:00
<?php
namespace App\Models;
2018-06-10 14:37:37 +00:00
/**
* Class Reply
* @property int id
* @property string content
* @property string created_at
* @property string updated_at
* @property int user_id
* @property int topic_id
* @property User user
2018-06-10 14:40:18 +00:00
* @property Topic topic
2018-06-10 14:37:37 +00:00
* @package App\Models
*/
2018-01-15 15:24:11 +00:00
class Reply extends Model
{
protected $fillable = ['content'];
public function topic()
{
return $this->belongsTo(Topic::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
}