diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 247120162..5a0af8d1e 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -38,7 +38,10 @@ class SearchController extends Controller }); $tokens->push($tags); } - $users = Profile::select('username', 'name', 'id')->where('username', 'like', '%'.$tag.'%')->limit(20)->get(); + $users = Profile::select('username', 'name', 'id') + ->where('username', 'like', '%'.$tag.'%') + ->limit(20) + ->get(); if($users->count() > 0) { $profiles = $users->map(function ($item, $key) { @@ -71,7 +74,7 @@ class SearchController extends Controller 'count' => 0, 'url' => $item->url(), 'type' => 'status', - 'value' => 'Posted '.$item->created_at->diffForHumans(), + 'value' => "by {$item->profile->username} {$item->created_at->diffForHumans(null, true, true)}", 'tokens' => [$item->caption], 'name' => $item->caption, 'thumb' => $item->thumb(),