FEATURE: create model for articles

This commit is contained in:
Michal Kváček
2016-10-04 00:44:24 +02:00
parent 35bdd38f4c
commit 06780015d4
2 changed files with 24 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace Modules\Blog\Article\Entities;
use App\Models\Content;
class Article extends Content
{
protected $table = 'contents';
public function comments()
{
return $this->hasMany(Comment::class, 'content_id')
->where('approved', true);
}
}