Topic and article relationship

This commit is contained in:
2020-08-08 23:13:10 +05:00
parent 8f68800126
commit dc9fd5bc1f

View File

@@ -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);
}
}