StatusMentionService.php 410 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Services;
  3. use Illuminate\Support\Facades\Cache;
  4. use App\Mention;
  5. use Illuminate\Support\Str;
  6. class StatusMentionService
  7. {
  8. public static function get($id)
  9. {
  10. return Mention::whereStatusId($id)
  11. ->get()
  12. ->map(function($mention) {
  13. return AccountService::get($mention->profile_id);
  14. })->filter(function($mention) {
  15. return $mention;
  16. })
  17. ->values()
  18. ->toArray();
  19. }
  20. }