FEATURE: add creating comments
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php namespace Modules\Blog\Article\Entities;
|
||||
|
||||
use App\Models\Content;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Comment extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'content_id',
|
||||
'content',
|
||||
'email',
|
||||
'name'
|
||||
];
|
||||
|
||||
public function author()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function article()
|
||||
{
|
||||
return $this->belongsTo(Content::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user