Topic and article relationship
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user