Commit 16c826ce authored by Waterfox's avatar Waterfox
Browse files

Update divings request

parent 892d2f0d
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -12,9 +12,7 @@ class DivingNumberController extends Controller
    public function index(): View
    {
        if (session()->has('user')) {
            $userId = session('user')->US_ID; // Récupérer l'ID de l'utilisateur connecté

            // Faire quelque chose avec l'utilisateur ou son ID
            $userId = session('user')->US_ID;
        } else {
            $userId = NULL;
        }
@@ -22,7 +20,7 @@ public function index(): View
        $dateDives = DivingNumberModel::join('CAR_REGISTRATION', 'CAR_USER.us_id', '=', 'CAR_REGISTRATION.us_id')
        ->join('CAR_DIVING_LOCATION','CAR_REGISTRATION.ds_code','=','CAR_DIVING_LOCATION.ds_code')
        ->join('CAR_DIVING_LOCATION','CAR_DIVING_LOCATION.dl_id','=','CAR_DIVING_LOCATION.dl_id')
        ->join('CAR_ROLE_ATTRIBUTION ','CAR_USER.us_id','=','CAR_ROLE_ATTRIBUTION .Us_id')
        ->join('CAR_ROLE_ATTRIBUTION','CAR_USER.us_id','=','CAR_ROLE_ATTRIBUTION.us_id')
        ->join('CAR_ROLE','CAR_ROLE_ATTRIBUTION.rol_code','=','CAR_ROLE.rol_code')

        ->where('CAR_USER.US_ID',$userId)