fixed the explore page after the admin panel

This commit is contained in:
ghassan committed 2026-01-26 01:25:56 +03:00
1 parent 9b3b0cd1f0
commit ab9b80f958
3 files changed
+503 -9

No files matched your search

@@ -73,7 +73,17 @@ class PlatformController extends Controller
*/
public function createClub()
{
$users = User::orderBy('full_name')->get();
$users = User::orderBy('full_name')->get()->map(function ($user) {
return [
'id' => $user->id,
'full_name' => $user->full_name,
'email' => $user->email,
'mobile' => $user->mobile_formatted,
'profile_picture' => $user->profile_picture
? asset('storage/' . $user->profile_picture)
: null,
];
});
return view('admin.platform.create-club', compact('users'));
}
@@ -132,7 +142,17 @@ class PlatformController extends Controller
*/
public function editClub(Tenant $club)
{
$users = User::orderBy('full_name')->get();
$users = User::orderBy('full_name')->get()->map(function ($user) {
return [
'id' => $user->id,
'full_name' => $user->full_name,
'email' => $user->email,
'mobile' => $user->mobile_formatted,
'profile_picture' => $user->profile_picture
? asset('storage/' . $user->profile_picture)
: null,
];
});
return view('admin.platform.edit-club', compact('club', 'users'));
}