ldc-dam/app/Article.php

17 lines
270 B
PHP
Raw Normal View History

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
/**
* The medias that belong to the article.
*/
public function medias()
{
return $this->belongsToMany('App\Media', 'medias_articles', 'article_id', 'media_id');
}
}