whereHas('modulo', fn ($q) => $q->where('identificador', $identificadorModulo)) ->first('id')->id ?? null; } }