17 lines
271 B
PHP
17 lines
271 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class Societe extends Model
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* The medias that belong to the societes.
|
||
|
|
*/
|
||
|
|
public function medias()
|
||
|
|
{
|
||
|
|
return $this->belongsToMany('App\Media', 'medias_societes', 'societe_id', 'media_id');
|
||
|
|
}
|
||
|
|
}
|