How to add additional column relationship in pivot table in Laravel
问题 Version: Laravel 5.4 I have 3 Models Model: Employee protected $fillable = ['name']; public function emails(){ return $this->belongsToMany('App\Email')->using('App\EmailEmployee'); } Model: Email protected $fillable = ['username']; public function employees(){ return $this->belongsToMany('App\Employee')->using('App\EmailEmployee'); } Every Employee has many email access and emails allocates to many employees. But I have another column in email_employee table email_id (emails table) employee