I'm trying to solve an application challenge in CakePHP 3.x
I have employees and I have seminars. Employees can have several seminars and seminars can have several employees. The catch though is that the role of each employee at each seminar can be different. An employee's relationship to a seminar could be Attendee, Host, Instructor, or Manager.
I know how to a do a classic many-to-many using a third table like such as
class SeminarsTable extends Table
{
public function initialize(array $config)
{
$this->belongsToMany('Employees', ['joinTable' => 'seminar_employee',]);
}
}
I'm sure I can cobble together any number of solutions to get it to function, but I'd like to stick to Cake conventions. Such as the join table being named "seminar_employee"
But how do I have four total relationships that facilitate different roles while sticking to convention?