From f2ff0b5beac1a59c0b19bc66e3e3d2d4a7e0b43a Mon Sep 17 00:00:00 2001 From: "fauzgabriel@gmail.com" Date: Mon, 4 May 2026 16:41:34 +0700 Subject: [PATCH] profile with user --- app/Http/Controllers/Api/ProfileController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}%"]); })