@@ 43-54 (lines=12) @@ | ||
40 | * |
|
41 | * @return \Illuminate\Database\Eloquent\Collection|null |
|
42 | */ |
|
43 | protected function getTags($type = null) |
|
44 | { |
|
45 | if ($this->tags === null) { |
|
46 | $this->tags = (new Model\Tag())->getGroupTags(); |
|
47 | } |
|
48 | ||
49 | if ($type) { |
|
50 | return $this->tags->where('name', $type)->first()->tags; |
|
51 | } |
|
52 | ||
53 | return $this->tags; |
|
54 | } |
|
55 | ||
56 | /** |
|
57 | * @param array $params |
@@ 49-60 (lines=12) @@ | ||
46 | * |
|
47 | * @return \Illuminate\Database\Eloquent\Collection|null |
|
48 | */ |
|
49 | protected function getTags($type = null) |
|
50 | { |
|
51 | if ($this->tags === null) { |
|
52 | $this->tags = (new Model\Tag())->getGroupTags(); |
|
53 | } |
|
54 | ||
55 | if ($type) { |
|
56 | return $this->tags->where('name', $type)->first()->tags; |
|
57 | } |
|
58 | ||
59 | return $this->tags; |
|
60 | } |
|
61 | ||
62 | /** |
|
63 | * Returns an array of tags to be used as the selectable options. |