| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public static function all() |
||
| 16 | { |
||
| 17 | $usernames = User::userNames()->get(); |
||
| 18 | $authors = Post::authors()->get(); |
||
| 19 | $allAvailableAuthors = collect([]); |
||
| 20 | |||
| 21 | foreach ($authors as $author) { |
||
| 22 | $allAvailableAuthors[] = $author->author; |
||
| 23 | } |
||
| 24 | foreach ($usernames as $username) { |
||
| 25 | $allAvailableAuthors[] = $username->name; |
||
| 26 | } |
||
| 27 | |||
| 28 | return $allAvailableAuthors->unique()->sort()->all(); |
||
| 29 | } |
||
| 31 |