laravel-learn-bbs/app/Models/Reply.php
2018-06-10 22:40:18 +08:00

32 lines
529 B
PHP

<?php
namespace App\Models;
/**
* 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
* @property Topic topic
* @package App\Models
*/
class Reply extends Model
{
protected $fillable = ['content'];
public function topic()
{
return $this->belongsTo(Topic::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
}