芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Models/Issue.php
belongsTo(Project::class, 'project_id'); } /** * @param int $projectId * @param null $userID * @return Issue[]|\Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection */ public static function projectIssuesPending($projectId, $userID = null) { $projectIssue = Issue::where('project_id', $projectId); if ($userID) { $projectIssue = $projectIssue->where('user_id', '=', $userID); } $projectIssue = $projectIssue->where('status', 'pending') ->get(); return $projectIssue; } public function checkIssueClient(): bool { $issue = Issue::where('id', $this->id) ->where('user_id', user()->id) ->count(); if ($issue > 0) { return true; } return false; } }