ldc-dam/app/Marque.php
2019-05-16 17:20:30 +02:00

25 lines
405 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Marque extends Model
{
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'COD_MARQUE';
/**
* The users that belong to the marque.
*/
public function users()
{
return $this->belongsToMany('App\User', 'marques_users', 'marque_id', 'user_id');
}
}