for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Usamamuneerchaudhary\Commentify\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class CommentReport extends Model
{
use HasFactory;
Illuminate\Database\Eloquent\Factories\HasFactory
$factoryClass
Usamamuneerchaudhary\Com...fy\Models\CommentReport
/**
* @var string
*/
protected $table = 'comment_reports';
* @var string[]
protected $fillable = [
'comment_id',
'user_id',
'ip',
'user_agent',
'reason',
'status',
'reviewed_by',
'reviewed_at',
];
protected $casts = [
'reviewed_at' => 'datetime',
* @return BelongsTo
public function comment(): BelongsTo
return $this->belongsTo(Comment::class);
}
public function user(): BelongsTo
return $this->belongsTo(User::class);
public function reviewer(): BelongsTo
return $this->belongsTo(User::class, 'reviewed_by');