diff --git a/app/Topic.php b/app/Topic.php index eaea39d..282fbc7 100644 --- a/app/Topic.php +++ b/app/Topic.php @@ -3,8 +3,12 @@ namespace App; use Illuminate\Database\Eloquent\Model; +use App\Article; class Topic extends Model { - // + public function articles() + { + return $this->belongsToMany(Article::class); + } }