@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | $query->with('translations'); |
| 51 | 51 | |
| 52 | 52 | foreach ($tags as $tag) { |
| 53 | - $query->whereHas('tags', function ($query) use ($type, $tag) { |
|
| 54 | - $query->whereHas('translations', function ($query) use ($type, $tag) { |
|
| 53 | + $query->whereHas('tags', function($query) use ($type, $tag) { |
|
| 54 | + $query->whereHas('translations', function($query) use ($type, $tag) { |
|
| 55 | 55 | $query->where($type, $tag); |
| 56 | 56 | }); |
| 57 | 57 | }); |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | $query->with('translations'); |
| 78 | 78 | |
| 79 | - return $query->whereHas('tags', function ($query) use ($type, $tags) { |
|
| 80 | - $query->whereHas('translations', function ($query) use ($type, $tags) { |
|
| 79 | + return $query->whereHas('tags', function($query) use ($type, $tags) { |
|
| 80 | + $query->whereHas('translations', function($query) use ($type, $tags) { |
|
| 81 | 81 | $query->whereIn($type, $tags); |
| 82 | 82 | }); |
| 83 | 83 | }); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | { |
| 165 | 165 | $tag = $this->createTagsModel()->where('namespace', $this->getEntityClassName()) |
| 166 | 166 | ->with('translations') |
| 167 | - ->whereHas('translations', function (Builder $q) use ($name) { |
|
| 167 | + ->whereHas('translations', function(Builder $q) use ($name) { |
|
| 168 | 168 | $q->where('slug', $this->generateTagSlug($name)); |
| 169 | 169 | })->first(); |
| 170 | 170 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | $tag = $this->createTagsModel() |
| 211 | 211 | ->where('namespace', $this->getEntityClassName()) |
| 212 | 212 | ->with('translations') |
| 213 | - ->whereHas('translations', function (Builder $q) use ($name) { |
|
| 213 | + ->whereHas('translations', function(Builder $q) use ($name) { |
|
| 214 | 214 | $q->orWhere('name', $this->generateTagSlug($name)); |
| 215 | 215 | $q->orWhere('slug', $this->generateTagSlug($name)); |
| 216 | 216 | })->first(); |