diff --git a/app/Http/Controllers/Api/ProfileController.php b/app/Http/Controllers/Api/ProfileController.php index 375136b..5e09f97 100644 --- a/app/Http/Controllers/Api/ProfileController.php +++ b/app/Http/Controllers/Api/ProfileController.php @@ -40,7 +40,7 @@ class ProfileController extends Controller $size = $request->integer('size') ?: 10; - $listProfile = Profile::when($request->search, function ($q, $search) { + $listProfile = Profile::with('user')->when($request->search, function ($q, $search) { $search = strtolower($search); $q->whereRaw('lower(nama) like ?', ["%{$search}%"]); })