mirror of
https://github.com/HtetPhone/MangaDex.git
synced 2025-02-20 11:23:19 +08:00
24 lines
431 B
PHP
24 lines
431 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Comment extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = ['comment', 'user_id', 'chapter_id'];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function replies()
|
|
{
|
|
return $this->hasMany(Reply::class, 'comment_id');
|
|
}
|
|
}
|