diff --git a/app/Article.php b/app/Article.php new file mode 100644 index 0000000..03ed312 --- /dev/null +++ b/app/Article.php @@ -0,0 +1,44 @@ +belongsTo(Source::class); + } + + public function topics() + { + return $this->belongsToMany(Topic::class); + } +} diff --git a/app/Source.php b/app/Source.php new file mode 100644 index 0000000..3cb728c --- /dev/null +++ b/app/Source.php @@ -0,0 +1,14 @@ +hasMany(Article::class); + } +} diff --git a/app/Topic.php b/app/Topic.php new file mode 100644 index 0000000..eaea39d --- /dev/null +++ b/app/Topic.php @@ -0,0 +1,10 @@ +