ldc-dam/app/Tag.php

20 lines
283 B
PHP
Raw Normal View History

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