From 66993b58733b0f070bb09db887724b13d00a422c Mon Sep 17 00:00:00 2001 From: Mohamed Jinas Date: Mon, 10 Aug 2020 06:17:30 +0500 Subject: [PATCH] Update Topic.php --- app/Topic.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Topic.php b/app/Topic.php index 282fbc7..a0ec749 100644 --- a/app/Topic.php +++ b/app/Topic.php @@ -7,8 +7,10 @@ use App\Article; class Topic extends Model { + protected $guarded = []; + public function articles() { - return $this->belongsToMany(Article::class); + return $this->belongsToMany(Article::class)->withTimestamps(); } }