芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Models/ProjectTemplateMember.php
user->email; } public function user(): BelongsTo { return $this->belongsTo(User::class, 'user_id')->withoutGlobalScope(ActiveScope::class); } public function projectTemplate(): BelongsTo { return $this->belongsTo(ProjectTemplate::class); } public static function byProject($id) { return ProjectTemplateMember::join('users', 'users.id', '=', 'project_template_members.user_id') ->where('project_template_members.project_id', $id) ->where('users.status', 'active') ->get(); } public static function checkIsMember($projectId, $userId) { return ProjectTemplateMember::where('project_template_id', $projectId) ->where('user_id', $userId)->first(); } }