there was a misunderstanding for this part I fix it. and the issue is not from the backend I just add some validation to make doubly sure.

This commit is contained in:
Moradi
2025-03-01 12:37:51 +03:30
parent 96de1c2fbe
commit e5253f7eda
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ class ItemController extends Controller
public function getItems()
{
$userId = auth('api')->user()->id;
$userId = auth('api')->id();
// $medicalCenterId = optional(optional($user)->medical_center)->id;
// $userIds = User::where('medical_center_id', $medicalCenterId)->pluck('id')->toArray();