belongsToMany('App\Model\Role'); } public function projects() { return $this->belongsToMany('App\Model\Project', 'project_users') ->withPivot('id', 'created_at') //->withTimestamps() ->as('subscription'); } }