Skip to content

Commit 52a6572

Browse files
committed
Merge pull request #76 from kasoprecede47/patch-3
Update to Taggable.php
2 parents 041329c + 3b9747a commit 52a6572

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/Taggable.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,9 @@ public function tagNames()
9393
*/
9494
public function tagSlugs()
9595
{
96-
$tagSlugs = array();
97-
$tagged = $this->tagged;
98-
99-
foreach($tagged as $tagged) {
100-
$tagSlugs[] = $tagged->tag_slug;
101-
}
102-
103-
return $tagSlugs;
96+
return $this->tagged->map(function($item){
97+
return $item->tag_slug;
98+
})->toArray();
10499
}
105100

106101
/**

0 commit comments

Comments
 (0)