PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / trunk
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration vtrunk
2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 1.41 1.45 All 41 releases
← All changes | app/Models/User.php +21 -0 1.21trunk View file →
@@ -129,5 +129,26 @@
129 129 'notification_id'
130 130 )->withTimestamps()
131 131 ->withPivot('marked_read_at');
132 132 }
133 + public function assignedTasks()
134 + {
135 + return $this->belongsToMany(
136 + Task::class,
137 + 'fbs_relations',
138 + 'foreign_id',
139 + 'object_id'
140 + )->withPivot('settings')
141 + ->wherePivot('object_type', Constant::OBJECT_TYPE_TASK_ASSIGNEE)
142 + ->withTimestamps();
143 + }
144 +
145 + public function mentionedTasks()
146 + {
147 + return Task::whereHas('notifications', function ($query) {
148 + $query->where('action', 'task_comment_mentioned')
149 + ->whereHas('users', function ($q) {
150 + $q->where('user_id', $this->ID);
151 + });
152 + });
153 + }
133 154 }