ÿØÿà JFIF H H ÿÛ C GIF89;
| System: Linux srv913213 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 Current Path : /var/www/yapwebtv.com/Modules_old/Post/Entities/ |
| Current File : /var/www/yapwebtv.com/Modules_old/Post/Entities/Comment.php |
<?php
namespace Modules\Post\Entities;
use Illuminate\Database\Eloquent\Model;
class Comment extends Model
{
protected $fillable = [
'post_id',
'user_id',
'comment',
'comment_id',
];
public function user(){
return $this->belongsTo('Modules\User\Entities\User');
}
public function post(){
return $this->belongsTo('Modules\Post\Entities\Post');
}
public function comment()
{
return $this->belongsToOne(Comment::class, 'comment_id')->whereNull('comment_id');
}
public function reply()
{
return $this->hasMany(Comment::class, 'comment_id')->whereNotNull('comment_id');
}
}