37 lines
647 B
PHP
37 lines
647 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class ForumReply extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'body',
|
|
'author_id',
|
|
'thread_id',
|
|
'stickied'
|
|
];
|
|
|
|
/**
|
|
* The author of this thread.
|
|
*/
|
|
public function author()
|
|
{
|
|
return $this->belongsTo(User::class, 'author_id');
|
|
}
|
|
|
|
public function thread()
|
|
{
|
|
return $this->belongsTo(ForumThread::class, 'thread_id');
|
|
}
|
|
}
|