| 1 | <?php |
||
| 25 | trait QueryTrait |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * Returns issue tags except for the status tags. |
||
| 29 | * |
||
| 30 | * @return Eloquent\Collection |
||
| 31 | */ |
||
| 32 | public function getTagsExceptStatus() |
||
| 33 | { |
||
| 34 | $statusGroup = Tag::where('name', '=', Tag::GROUP_STATUS)->first(); |
||
| 35 | |||
| 36 | return $this->tags()->where('parent_id', '!=', $statusGroup->id); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Returns issue tags except for a specific tag. |
||
| 41 | * |
||
| 42 | * @param string $tag |
||
| 43 | * |
||
| 44 | * @return Eloquent\Collection |
||
| 45 | */ |
||
| 46 | public function getTagsExcept($tag) |
||
| 50 | } |
||
| 51 |