2019-06-25 16:17:56 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Tag extends Model
|
|
|
|
|
{
|
|
|
|
|
|
2019-07-11 11:45:47 +02:00
|
|
|
public $timestamps = false;
|
2019-06-25 16:17:56 +02:00
|
|
|
/**
|
|
|
|
|
* The media that belong to the tags.
|
|
|
|
|
*/
|
|
|
|
|
public function medias()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsToMany('App\Media', 'medias_tags', 'tag_id', 'media_id');
|
|
|
|
|
}
|
2019-07-11 11:45:47 +02:00
|
|
|
|
2019-06-25 16:17:56 +02:00
|
|
|
}
|