ldc-dam/app/Tag.php
2019-06-25 16:17:56 +02:00

17 lines
253 B
PHP

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