-
app/Base/Contracts/HasMembers.php
Open in GitHubuse Illuminate\Database\Eloquent\Relations\BelongsToMany; interface HasMembers { public function members(): BelongsToMany; }
-
app/Office/Models/Office.php
Open in GitHubuse App\Base\Models\Group; use App\Base\Contracts\HasMembers; class Office extends Group implements HasMembers { // public function members(): BelongsToMany { return $this->belongsToMany(User::class, 'office_user', 'office_id', 'user_id'); } // }
-
app/Project/Models/Project.php
Open in GitHubuse App\Base\Models\Group; use App\Base\Contracts\HasMembers; use Illuminate\Database\Eloquent\Relations\BelongsToMany; class Project extends Group implements HasMembers { // public function members(): BelongsToMany { return $this->belongsToMany(User::class, 'project_user', 'project_id', 'user_id'); } // }
-
app/Team/Models/Team.php
Open in GitHubuse App\Base\Contracts\HasMembers; use Illuminate\Database\Eloquent\Relations\BelongsToMany; class Team extends Group implements HasMembers { public function members(): BelongsToMany { return $this->belongsToMany(\App\Base\Models\User::class, 'team_user', 'team_id', 'user_id'); } }