FIX: fix minor bugs in blog module

This commit is contained in:
Michal Kváček
2016-10-04 11:16:04 +02:00
parent 581e32e98b
commit f699d2c569
3 changed files with 81 additions and 97 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ class Comment extends Model
'content_id',
'content',
'email',
'name'
'name',
'approved'
];
public function author()
@@ -40,7 +40,8 @@ class CreateNewComment extends Controller
'content_id' => $article->id,
'name' => $name,
'email' => $email,
'content' => $content
'content' => $content,
'approved' => !is_null($user)
]);
// fire event about new comment