2019-08-09 10:51:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
2019-09-12 11:08:25 +02:00
|
|
|
namespace App\Models;
|
2019-08-09 10:51:42 +02:00
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Societe extends Model
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The medias that belong to the societes.
|
|
|
|
|
*/
|
|
|
|
|
public function medias()
|
|
|
|
|
{
|
2019-09-12 11:08:25 +02:00
|
|
|
return $this->belongsToMany('App\Models\Media', 'medias_societes', 'societe_id', 'media_id');
|
2019-08-09 10:51:42 +02:00
|
|
|
}
|
|
|
|
|
}
|