I have 3 tables.
The first two tables are Groups and Accounts.
The name of the pivot table should be
As given in laravel docs
To define this relationship, three database tables are needed: users, roles, and role_user. The role_user table is derived from the alphabetical order of the related model names, and contains the user_id and role_id columns.
Though, you can always overwrite the default naming convention like below:
return $this->belongsToMany('App\Group', 'GroupsAccountAssignment', 'account_id', 'group_id');